1 2/* AUTOGENERATED: jquery.min.js */
vendor: 15,088 bytes, lines 3-4
3/*! jQuery v3.5.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(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}S.fn=S.prototype={jquery:f,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(n){return this.pushStack(S.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},S.extend=S.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||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[t]=S.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},S.extend({expando:"jQuery"+(f+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]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=v.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(p(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},makeArray:function(e,t){var n=t||[];return null!=e&&(p(Object(e))?S.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.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=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(p(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:y}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=t[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var d=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,S="sizzle"+1*new Date,p=n.document,k=0,r=0,m=ue(),x=ue(),A=ue(),N=ue(),D=function(e,t){return e===t&&(l=!0),0},j={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",F=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",B=new RegExp(M+"+","g"),$=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),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("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(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 de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){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[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.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},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="<a id='"+S+"'></a><select id='"+S+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.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 l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(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?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0<se(t,C,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||e)!=C&&T(e),y(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=C&&T(e);var n=b.attrHandle[t.toLowerCase()],r=n&&j.call(b.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:d.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),e.sort(D),l){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)e.splice(n[r],1)}return u=null,e},o=se.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else while(t=e[r++])n+=o(t);return n},(b=se.selectors={cacheLength:50,createPseudo:le,match:G,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(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===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]||se.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]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(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(te,ne).toLowerCase();return"*"===e?function(){return!0}
vendor: 4,356 bytes, line 4
4:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(B," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,v){var y="nth"!==h.slice(0,3),m="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===v?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=y!==m?"nextSibling":"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(y){while(l){a=e;while(a=a[l])if(x?a.nodeName.toLowerCase()===f:1===a.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[m?c.firstChild:c.lastChild],m&&p){d=(s=(r=(i=(o=(a=c)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1])&&r[2],a=s&&c.childNodes[s];while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if(1===a.nodeType&&++d&&a===e){i[h]=[k,s,d];break}}else if(p&&(d=s=(r=(i=(o=(a=e)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1]),!1===d)while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if((x?a.nodeName.toLowerCase()===f:1===a.nodeType)&&++d&&(p&&((i=(o=a[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[k,d]),a===e))break;return(d-=v)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return a[S]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=P(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:le(function(e){var r=[],i=[],s=f(e.replace($,"$1"));return s[S]?le(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:le(function(t){return function(e){return 0<se(t,e).length}}),contains:le(function(t){return t=t.replace(te,ne),function(e){return-1<(e.textContent||o(e)).indexOf(t)}}),lang:le(function(n){return V.test(n||"")||se.error("unsupported lang: "+n),n=n.replace(te,ne).toLowerCase(),function(e){var t;do{if(t=E?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!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!b.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.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:ve(function(){return[0]}),last:ve(function(e,t){return[t-1]}),eq:ve(function(e,t,n){return[n<0?n+t:n]}),even:ve(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ve(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ve(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:ve(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=de(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=he(e);function me(){}function xe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function be(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r++;return e.first?function(e,t,n){while(e=e[u])if(1===e.nodeType||f)return s(e,t,n);return!1}:function(e,t,n){var r,i,o,a=[k,p];
vendor: 10,068 bytes, line 4
4if(n){while(e=e[u])if((1===e.nodeType||f)&&s(e,t,n))return!0}else while(e=e[u])if(1===e.nodeType||f)if(i=(o=e[S]||(e[S]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===k&&r[1]===p)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return!0}return!1}}function we(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Te(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 Ce(d,h,g,v,y,e){return v&&!v[S]&&(v=Ce(v)),y&&!y[S]&&(y=Ce(y,e)),le(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:Te(c,s,d,n,r),p=g?y||(e?d:l||v)?[]:t:f;if(g&&g(f,p,n,r),v){i=Te(p,u),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a))}if(e){if(y||d){if(y){i=[],o=p.length;while(o--)(a=p[o])&&i.push(f[o]=a);y(null,p=[],i,r)}o=p.length;while(o--)(a=p[o])&&-1<(i=y?P(e,a):s[o])&&(e[i]=!(t[i]=a))}}else p=Te(p===t?p.splice(l,p.length):p),y?y(null,t,p,r):H.apply(t,p)})}function Ee(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=be(function(e){return e===i},a,!0),l=be(function(e){return-1<P(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!==w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[be(we(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[S]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return Ce(1<s&&we(c),1<s&&xe(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace($,"$1"),t,s<n&&Ee(e.slice(s,n)),n<r&&Ee(e=e.slice(n)),n<r&&xe(e))}c.push(t)}return we(c)}return me.prototype=b.filters=b.pseudos,b.setFilters=new me,h=se.tokenize=function(e,t){var n,r,i,o,a,s,u,l=x[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=_.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=z.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace($," ")}),a=a.slice(n.length)),b.filter)!(r=G[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?se.error(e):x(e,s).slice(0)},f=se.compile=function(e,t){var n,v,y,m,x,r,i=[],o=[],a=A[e+" "];if(!a){t||(t=h(e)),n=t.length;while(n--)(a=Ee(t[n]))[S]?i.push(a):o.push(a);(a=A(e,(v=o,m=0<(y=i).length,x=0<v.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=k+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t==C||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument==C||(T(o),n=!E);while(s=v[a++])if(s(o,t||C,n)){r.push(o);break}i&&(k=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=q.call(r));f=Te(f)}H.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&se.uniqueSort(r)}return i&&(k=h,w=p),c},m?le(r):r))).selector=e}return a},g=se.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(te,ne),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=G.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(te,ne),ee.test(o[0].type)&&ye(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&xe(o)))return H.apply(n,r),n;break}}}return(l||f(e,c))(r,t,!E,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},d.sortStable=S.split("").sort(D).join("")===S,d.detectDuplicates=!!l,T(),d.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(C.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),d.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||fe(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(C);S.find=d,S.expr=d.selectors,S.expr[":"]=S.expr.pseudos,S.uniqueSort=S.unique=d.uniqueSort,S.text=d.getText,S.isXMLDoc=d.isXML,S.contains=d.contains,S.escapeSelector=d.escape;var h=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&S(e).is(n))break;r.push(e)}return r},T=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},k=S.expr.match.needsContext;function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var N=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1<i.call(n,e)!==r}):S.filter(n,e,r)}S.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?S.find.matchesSelector(r,e)?[r]:[]:S.find.matches(e,S.grep(t,function(e){return 1===e.nodeType}))},S.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(S(e).filter(function(){for(t=0;t<r;t++)if(S.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)S.find(e,i[t],n);return 1<r?S.uniqueSort(n):n},filter:function(e){return this.pushStack(D(this,e||[],!1))},not:function(e){return this.pushStack(D(this,e||[],!0))},is:function(e){return!!D(this,"string"==typeof e&&k.test(e)?S(e):e||[],!1).length}});var j,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(S.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&S(e);if(!k.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&S.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?S.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(S(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return h(e,"parentNode")},parentsUntil:function(e,t,n){return h(e,"parentNode",n)},next:function(e){return O(e,"nextSibling")},prev:function(e){return O(e,"previousSibling")},nextAll:function(e){return h(e,"nextSibling")},prevAll:function(e){return h(e,"previousSibling")},nextUntil:function(e,t,n){return h(e,"nextSibling",n)},prevUntil:function(e,t,n){return h(e,"previousSibling",n)},siblings:function(e){return T((e.parentNode||{}).firstChild,e)},children:function(e){return T(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(A(e,"template")&&(e=e.content||e),S.merge([],e.childNodes))}},function(r,i){S.fn[r]=function(e,t){var n=S.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=S.filter(t,n)),1<this.length&&(H[r]||S.uniqueSort(n),L.test(r)&&n.reverse()),this.pushStack(n)}});var P=/[^\x20\t\r\n\f]+/g;function R(e){return e}function M(e){throw e}function I(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}S.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},S.each(e.match(P)||[],function(e,t){n[t]=!0}),n):S.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){S.each(e,function(e,t){m(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==w(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return S.each(arguments,function(e,t){var n;while(-1<(n=S.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<S.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},S.extend({Deferred:function(e){var o=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],i="pe
vendor: 8,547 bytes, line 4
4nding",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return S.Deferred(function(r){S.each(o,function(e,t){var n=m(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&m(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,m(t)?s?t.call(e,l(u,o,R,s),l(u,o,M,s)):(u++,t.call(e,l(u,o,R,s),l(u,o,M,s),l(u,o,R,o.notifyWith))):(a!==R&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==M&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(S.Deferred.getStackHook&&(t.stackTrace=S.Deferred.getStackHook()),C.setTimeout(t))}}return S.Deferred(function(e){o[0][3].add(l(0,e,m(r)?r:R,e.notifyWith)),o[1][3].add(l(0,e,m(t)?t:R)),o[2][3].add(l(0,e,m(n)?n:M))}).promise()},promise:function(e){return null!=e?S.extend(e,a):a}},s={};return S.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=s.call(arguments),o=S.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?s.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(I(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||m(i[t]&&i[t].then)))return o.then();while(t--)I(i[t],a(t),o.reject);return o.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(e,t){C.console&&C.console.warn&&e&&W.test(e.name)&&C.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},S.readyException=function(e){C.setTimeout(function(){throw e})};var F=S.Deferred();function B(){E.removeEventListener("DOMContentLoaded",B),C.removeEventListener("load",B),S.ready()}S.fn.ready=function(e){return F.then(e)["catch"](function(e){S.readyException(e)}),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--S.readyWait:S.isReady)||(S.isReady=!0)!==e&&0<--S.readyWait||F.resolveWith(E,[S])}}),S.ready.then=F.then,"complete"===E.readyState||"loading"!==E.readyState&&!E.documentElement.doScroll?C.setTimeout(S.ready):(E.addEventListener("DOMContentLoaded",B),C.addEventListener("load",B));var $=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===w(n))for(s in i=!0,n)$(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(S(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},_=/^-ms-/,z=/-([a-z])/g;function U(e,t){return t.toUpperCase()}function X(e){return e.replace(_,"ms-").replace(z,U)}var V=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function G(){this.expando=S.expando+G.uid++}G.uid=1,G.prototype={cache:function(e){var t=e[this.expando];return t||(t={},V(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[X(t)]=n;else for(r in t)i[X(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][X(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(X):(t=X(t))in r?[t]:t.match(P)||[]).length;while(n--)delete r[t[n]]}(void 0===t||S.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&&!S.isEmptyObject(t)}};var Y=new G,Q=new G,J=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,K=/[A-Z]/g;function Z(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(K,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:J.test(i)?JSON.parse(i):i)}catch(e){}Q.set(e,t,n)}else n=void 0;return n}S.extend({hasData:function(e){return Q.hasData(e)||Y.hasData(e)},data:function(e,t,n){return Q.access(e,t,n)},removeData:function(e,t){Q.remove(e,t)},_data:function(e,t,n){return Y.access(e,t,n)},_removeData:function(e,t){Y.remove(e,t)}}),S.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=Q.get(o),1===o.nodeType&&!Y.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=X(r.slice(5)),Z(o,r,i[r]));Y.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){Q.set(this,n)}):$(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=Q.get(o,n))?t:void 0!==(t=Z(o,n))?t:void 0;this.each(function(){Q.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){Q.remove(this,e)})}}),S.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Y.get(e,t),n&&(!r||Array.isArray(n)?r=Y.access(e,t,S.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=S.queue(e,t),r=n.length,i=n.shift(),o=S._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){S.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Y.get(e,n)||Y.access(e,n,{empty:S.Callbacks("once memory").add(function(){Y.remove(e,[t+"queue",n])})})}}),S.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?S.queue(this[0],t):void 0===n?this:this.each(function(){var e=S.queue(this,t,n);S._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&S.dequeue(this,t)})},dequeue:function(e){return this.each(function(){S.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=S.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=Y.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,te=new RegExp("^(?:([+-])=|)("+ee+")([a-z%]*)$","i"),ne=["Top","Right","Bottom","Left"],re=E.documentElement,ie=function(e){return S.contains(e.ownerDocument,e)},oe={composed:!0};re.getRootNode&&(ie=function(e){return S.contains(e.ownerDocument,e)||e.getRootNode(oe)===e.ownerDocument});var ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ie(e)&&"none"===S.css(e,"display")};function se(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return S.css(e,t,"")},u=s(),l=n&&n[3]||(S.cssNumber[t]?"":"px"),c=e.nodeType&&(S.cssNumber[t]||"px"!==l&&+u)&&te.exec(S.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)S.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,S.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 ue={};function le(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Y.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ae(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ue[s])||(o=a.body.appendChild(a.createElement(s)),u=S.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ue[s]=u)))):"none"!==n&&(l[c]="none",Y.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}S.fn.extend({show:function(){return le(this,!0)},hide:function(){return le(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?S(this).show():S(this).hide()})}});var ce,fe,pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone
vendor: 51,416 bytes, line 4
4=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="<textarea>x</textarea>",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="<option></option>",y.option=!!ce.lastChild;var ge={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,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n<r;n++)Y.set(e[n],"globalEval",!t||Y.get(t[n],"globalEval"))}ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td,y.option||(ge.optgroup=ge.option=[1,"<select multiple='multiple'>","</select>"]);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"===w(o))S.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]+S.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;S.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<S.inArray(o,r))i&&i.push(o);else if(l=ie(o),a=ve(f.appendChild(o),"script"),l&&ye(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}var be=/^key/,we=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Te=/^([^.]*)(?:\.(.+)|)/;function Ce(){return!0}function Ee(){return!1}function Se(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function ke(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)ke(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=Ee;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return S().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=S.guid++)),e.each(function(){S.event.add(this,t,i,r,n)})}function Ae(e,i,o){o?(Y.set(e,i,!1),S.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Y.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(S.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Y.set(this,i,r),t=o(this,i),this[i](),r!==(n=Y.get(this,i))||t?Y.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Y.set(this,i,{value:S.event.trigger(S.extend(r[0],S.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,i)&&S.event.add(e,i,Ce)}S.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.get(t);if(V(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&S.find.matchesSelector(re,i),n.guid||(n.guid=S.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof S&&S.event.triggered!==e.type?S.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(P)||[""]).length;while(l--)d=g=(s=Te.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=S.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=S.event.special[d]||{},c=S.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&S.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),S.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.hasData(e)&&Y.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(P)||[""]).length;while(l--)if(d=g=(s=Te.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=S.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,v.handle)||S.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)S.event.remove(e,d+t[l],n,r,!0);S.isEmptyObject(u)&&Y.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=S.event.fix(e),l=(Y.get(this,"events")||Object.create(null))[u.type]||[],c=S.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=S.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((S.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.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&&1<=e.button))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?-1<S(i,this).index(l):S.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(t,e){Object.defineProperty(S.Event.prototype,t,{enumerable:!0,configurable:!0,get:m(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[S.expando]?e:new S.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Ae(t,"click",Ce),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Ae(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&A(t,"input")&&Y.get(t,"click")||A(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},S.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},S.Event=function(e,t){if(!(this instanceof S.Event))return new S.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ce:Ee,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&&S.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:Ee,isPropagationStopped:Ee,isImmediatePropagationStopped:Ee,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ce,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ce,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ce,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},S.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,code:!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&&be.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&we.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},S.event.addProp),S.each({focus:"focusin",blur:"focusout"},function(e,t){S.event.special[e]={setup:function(){return Ae(this,e,Se),!1},trigger:function(){return Ae(this,e),!0},delegateType:t}}),S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){S.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||S.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),S.fn.extend({on:function(e,t,n,r){return ke(this,e,t,n,r)},one:function(e,t,n,r){return ke(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,S(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=Ee),this.each(function(){S.event.remove(this,e,n,t)})}});var Ne=/<script|<style|<link/i,De=/checked\s*(?:[^=]|=\s*.checked.)/i,je=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)S.event.add(t,i,s[i][n]);Q.hasData(e)&&(o=Q.access(e),a=S.extend({},o),Q.set(t,a))}}function Pe(n,r,i,o){r=g(r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=m(d);if(h||1<f&&"string"==typeof d&&!y.checkClone&&De.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),Pe(t,r,i,o)});if(f&&(t=(e=xe(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=S.map(ve(e,"script"),Le)).length;c<f;c++)u=e,c!==p&&(u=S.clone(u,!0,!0),s&&S.merge(a,ve(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,S.map(a,He),c=0;c<s;c++)u=a[c],he.test(u.type||"")&&!Y.access(u,"globalEval")&&S.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?S._evalUrl&&!u.noModule&&S._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):b(u.textContent.replace(je,""),u,l))}return n}function Re(e,t,n){for(var r,i=t?S.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||S.cleanData(ve(r)),r.parentNode&&(n&&ie(r)&&ye(ve(r,"script")),r.parentNode.removeChild(r));return e}S.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=ie(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||S.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&pe.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||ve(e),a=a||ve(c),r=0,i=o.length;r<i;r++)Oe(o[r],a[r]);else Oe(e,c);return 0<(a=ve(c,"script")).length&&ye(a,!f&&ve(e,"script")),c},cleanData:function(e){for(var t,n,r,i=S.event.special,o=0;void 0!==(n=e[o]);o++)if(V(n)){if(t=n[Y.expando]){if(t.events)for(r in t.events)i[r]?S.event.remove(n,r):S.removeEvent(n,r,t.handle);n[Y.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),S.fn.extend({detach:function(e){return Re(this,e,!0)},remove:function(e){return Re(this,e)},text:function(e){return $(this,function(e){return void 0===e?S.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 Pe(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||qe(this,e).appendChild(e)})},prepend:function(){return Pe(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=qe(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Pe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Pe(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&&(S.cleanData(ve(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return S.clone(this,e,t)})},html:function(e){return $(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&&!Ne.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(S.cleanData(ve(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return Pe(this,arguments,function(e){var t=this.parentNode;S.inArray(this,n)<0&&(S.cleanData(ve(this)),t&&t.replaceChild(e,this))},n)}}),S.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){S.fn[e]=function(e){for(var t,n=[],r=S(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),S(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)}});var Me=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Ie=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},We=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},Fe=new RegExp(ne.join("|"),"i");function Be(e,t,n){var r,i,o,a,s=e.style;return(n=n||Ie(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||ie(e)||(a=S.style(e,t)),!y.pixelBoxStyles()&&Me.test(a)&&Fe.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}}}!function(){function e(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",re.appendChild(u).appendChild(l);var e=C.getComputedStyle(l);n="1%"!==e.top,s=12===t(e.marginLeft),l.style.right="60%",o=36===t(e.right),r=36===t(e.width),l.style.position="absolute",i=12===t(l.offsetWidth/3),re.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=E.createElement("div"),l=E.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",y.clearCloneStyle="content-box"===l.style.backgroundClip,S.extend(y,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=E.createElement("table"),t=E.createElement("tr"),n=E.createElement("div"),e.style.cssText="position:absolute;left:-11111px",t.style.height="1px",n.style.height="9px",re.appendChild(e).appendChild(t).appendChild(n),r=C.getComputedStyle(t),a=3<parseInt(r.height),re.removeChild(e)),a}}))}();var _e=["Webkit","Moz","ms"],ze=E.createElement("div").style,Ue={};function Xe(e){var t=S.cssProps[e]||Ue[e];return t||(e in ze?e:Ue[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=_e.length;while(n--)if((e=_e[n]+t)in ze)return e}(e)||e)}var Ve=/^(none|table(?!-c[ea]).+)/,Ge=/^--/,Ye={position:"absolute",visibility:"hidden",display:"block"},Qe={letterSpacing:"0",fontWeight:"400"};function Je(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Ke(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+=S.css(e,n+ne[a],!0,i)),r?("content"===n&&(u-=S.css(e,"padding"+ne[a],!0,i)),"margin"!==n&&(u-=S.css(e,"border"+ne[a]+"Width",!0,i))):(u+=S.css(e,"padding"+ne[a],!0,i),"padding"!==n?u+=S.css(e,"border"+ne[a]+"Width",!0,i):s+=S.css(e,"border"+ne[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function Ze(e,t,n){var r=Ie(e),i=(!y.boxSizingReliable()||n)&&"border-box"===S.css(e,"boxSizing",!1,r),o=i,a=Be(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Me.test(a)){if(!n)return a;a="auto"}return(!y.boxSizingReliable()&&i||!y.reliableTrDimensions()&&A(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===S.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===S.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+Ke(e,t,n||(i?"border":"content"),o,r,a)+"px"}function et(e,t,n,r,i){return new et.prototype.init(e,t,n,r,i)}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Be(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!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=X(t),u=Ge.test(t),l=e.style;if(u||(t=Xe(s)),a=S.cssHooks[t]||S.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=te.exec(n))&&i[1]&&(n=se(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(S.cssNumber[s]?"":"px")),y.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=X(t);return Ge.test(t)||(t=Xe(s)),(a=S.cssHooks[t]||S.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Be(e,t,r)),"normal"===i&&t in Qe&&(i=Qe[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),S.each(["height","width"],function(e,u){S.cssHooks[u]={get:function(e,t,n){if(t)return!Ve.test(S.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Ze(e,u,n):We(e,Ye,function(){return Ze(e,u,n)})},set:function(e,t,n){var r,i=Ie(e),o=!y.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===S.css(e,"boxSizing",!1,i),s=n?Ke(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-Ke(e,u,"border",!1,i)-.5)),s&&(r=te.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=S.css(e,u)),Je(0,t,s)}}}),S.cssHooks.marginLeft=$e(y.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Be(e,"marginLeft"))||e.getBoundingClientRect().left-We(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),S.each({margin:"",padding:"",border:"Width"},function(i,o){S.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+ne[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(S.cssHooks[i+o].set=Je)}),S.fn.extend({css:function(e,t){return $(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Ie(e),i=t.length;a<i;a++)o[t[a]]=S.css(e,t[a],!1,r);return o}return void 0!==n?S.style(e,t,n):S.css(e,t)},e,t,1<arguments.length)}}),((S.Tween=et).prototype={constructor:et,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(S.cssNumber[n]?"":"px")},cur:function(){var e=et.propHooks[this.prop];return e&&e.get?e.get(this):et.propHooks._default.get(this)},run:function(e){var t,n=et.propHooks[this.prop];return this.options.duration?this.pos=t=S.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):et.propHooks._default.set(this),this}}).init.prototype=et.prototype,(et.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=S.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):1!==e.elem.nodeType||!S.cssHooks[e.prop]&&null==e.elem.style[Xe(e.prop)]?e.elem[e.prop]=e.now:S.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=et.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},S.fx=et.prototype.init,S.fx.step={};var tt,nt,rt,it,ot=/^(?:toggle|show|hide)$/,at=/queueHooks$/;function st(){nt&&(!1===E.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(st):C.setTimeout(st,S.fx.interval),S.fx.tick())}function ut(){return C.setTimeout(function(){tt=void 0}),tt=Date.now()}function lt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ne[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ct(e,t,n){for(var r,i=(ft.tweeners[t]||[]).concat(ft.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function ft(o,e,t){var n,a,r=0,i=ft.prefilters.length,s=S.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=tt||ut(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:S.extend({},e),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},t),originalProperties:e,originalOptions:t,startTime:tt||ut(),duration:t.duration,tweens:[],createTween:function(e,t){var n=S.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=X(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=S.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=ft.prefilters[r].call(l,o,c,l.opts))return m(n.stop)&&(S._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return S.map(c,ct,l),m(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),S.fx.timer(S.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}S.Animation=S.extend(ft,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return se(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(P);for(var n,r=0,i=e.length;r<i;r++)n=e[r],ft.tweeners[n]=ft.tweeners[n]||[],ft.tweeners[n].unshift(t)},prefilters:[function(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),v=Y.get(e,"fxshow");for(r in n.queue||(null==(a=S._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--,S.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],ot.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||S.style(e,r)}if((u=!S.isEmptyObject(t))||!S.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=Y.get(e,"display")),"none"===(c=S.css(e,"display"))&&(l?c=l:(le([e],!0),l=e.style.display||l,c=S.css(e,"display"),le([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===S.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,d)u||(v?"hidden"in v&&(g=v.hidden):v=Y.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&le([e],!0),p.done(function(){for(r in g||le([e]),Y.remove(e,"fxshow"),d)S.style(e,r,d[r])})),u=ct(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?ft.prefilters.unshift(e):ft.prefilters.push(e)}}),S.speed=function(e,t,n){var r=e&&"object"==typeof e?S.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return S.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in S.fx.speeds?r.duration=S.fx.speeds[r.duration]:r.duration=S.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&S.dequeue(this,r.queue)},r},S.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(t,e,n,r){var i=S.isEmptyObject(t),o=S.speed(e,n,r),a=function(){var e=ft(this,S.extend({},t),o);(i||Y.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=S.timers,r=Y.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&at.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||S.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=Y.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=S.timers,o=n?n.length:0;for(t.finish=!0,S.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),S.each(["toggle","show","hide"],function(e,r){var i=S.fn[r];S.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(lt(r,!0),e,t,n)}}),S.each({slideDown:lt("show"),slideUp:lt("hide"),slideToggle:lt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){S.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),S.timers=[],S.fx.tick=function(){var e,t=0,n=S.timers;for(tt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||S.fx.stop(),tt=void 0},S.fx.timer=function(e){S.timers.push(e),S.fx.start()},S.fx.interval=13,S.fx.start=function(){nt||(nt=!0,st())},S.fx.stop=function(){nt=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(r,e){return r=S.fx&&S.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=C.setTimeout(e,r);t.stop=function(){C.clearTimeout(n)}})},rt=E.createElement("input"),it=E.createElement("select").appendChild(E.createElement("option")),rt.type="checkbox",y.checkOn=""!==rt.value,y.optSelected=it.selected,(rt=E.createElement("input")).value="t",rt.type="radio",y.radioValue="t"===rt.value;var pt,dt=S.expr.attrHandle;S.fn.extend({attr:function(e,t){return $(this,S.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){S.removeAttr(this,e)})}}),S.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?S.prop(e,t,n):(1===o&&S.isXMLDoc(e)||(i=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?pt:void 0)),void 0!==n?null===n?void S.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=S.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!y.radioValue&&"radio"===t&&A(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(P);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),pt={set:function(e,t,n){return!1===t?S.removeAttr(e,n):e.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\w+/g),function(e,t){var a=dt[t]||S.find.attr;dt[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=dt[o],dt[o]=r,r=null!=a(e,t,n)?o:null,dt[o]=i),r}});var ht=/^(?:input|select|textarea|button)$/i,gt=/^(?:a|area)$/i;function vt(e){return(e.match(P)||[]).join(" ")}function yt(e){return e.getAttribute&&e.getAttribute("class")||""}function mt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(P)||[]}S.fn.extend({prop:function(e,t){return $(this,S.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[S.propFix[e]||e]})}}),S.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&S.isXMLDoc(e)||(t=S.propFix[t]||t,i=S.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=S.find.attr(e,"tabindex");return t?parseInt(t,10):ht.test(e.nodeName)||gt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),y.optSelected||(S.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)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){S.propFix[this.toLowerCase()]=this}),S.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).addClass(t.call(this,e,yt(this)))});if((e=mt(t)).length)while(n=this[u++])if(i=yt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=e[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).removeClass(t.call(this,e,yt(this)))});if(!arguments.length)return this.attr("class","");if((e=mt(t)).length)while(n=this[u++])if(i=yt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=e[a++])while(-1<r.indexOf(" "+o+" "))r=r.replace(" "+o+" "," ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(i,t){var o=typeof i,a="string"===o||Array.isArray(i);return"boolean"==typeof t&&a?t?this.addClass(i):this.removeClass(i):m(i)?this.each(function(e){S(this).toggleClass(i.call(this,e,yt(this),t),t)}):this.each(function(){var e,t,n,r;if(a){t=0,n=S(this),r=mt(i);while(e=r[t++])n.hasClass(e)?n.removeClass(e):n.addClass(e)}else void 0!==i&&"boolean"!==o||((e=yt(this))&&Y.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===i?"":Y.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+vt(yt(n))+" ").indexOf(t))return!0;return!1}});var xt=/\r/g;S.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=m(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,S(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=S.map(t,function(e){return null==e?"":e+""})),(r=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=S.valHooks[t.type]||S.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(xt,""):null==e?"":e:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,"value");return null!=t?t:vt(S.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||!A(n.parentNode,"optgroup"))){if(t=S(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=S.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<S.inArray(S.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),S.each(["radio","checkbox"],function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<S.inArray(S(e).val(),t)}},y.checkOn||(S.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),y.focusin="onfocusin"in C;var bt=/^(?:focusinfocus|focusoutblur)$/,wt=function(e){e.stopPropagation()};S.extend(S.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||E],d=v.call(e,"type")?e.type:e,h=v.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||E,3!==n.nodeType&&8!==n.nodeType&&!bt.test(d+S.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[S.expando]?e:new S.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:S.makeArray(t,[e]),c=S.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!x(n)){for(s=c.delegateType||d,bt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||E)&&p.push(a.defaultView||a.parentWindow||C)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(Y.get(o,"events")||Object.create(null))[e.type]&&Y.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&V(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!V(n)||u&&m(n[d])&&!x(n)&&((a=n[u])&&(n[u]=null),S.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,wt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,wt),S.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=S.extend(new S.Event,n,{type:e,isSimulated:!0});S.event.trigger(r,null,t)}}),S.fn.extend({trigger:function(e,t){return this.each(function(){S.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return S.event.trigger(e,t,n,!0)}}),y.focusin||S.each({focus:"focusin",blur:"focusout"},function(n,r){var i=function(e){S.event.simulate(r,e.target,S.event.fix(e))};S.event.special[r]={setup:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r);t||e.addEventListener(n,i,!0),Y.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r)-1;t?Y.access(e,r,t):(e.removeEventListener(n,i,!0),Y.remove(e,r))}}});var Tt=C.location,Ct={guid:Date.now()},Et=/\?/;S.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||S.error("Invalid XML: "+e),t};var St=/\[\]$/,kt=/\r?\n/g,At=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;function Dt(n,e,r,i){var t;if(Array.isArray(e))S.each(e,function(e,t){r||St.test(n)?i(n,t):Dt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==w(e))i(n,e);else for(t in e)Dt(n+"["+t+"]",e[t],r,i)}S.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,function(){i(this.name,this.value)});else for(n in e)Dt(n,e[n],t,i);return r.join("&")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=S.prop(this,"elements");return e?S.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!S(this).is(":disabled")&&Nt.test(this.nodeName)&&!At.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=S(this).val();return null==n?null:Array.isArray(n)?S.map(n,function(e){return{name:t.name,value:e.replace(kt,"\r\n")}}):{name:t.name,value:n.replace(kt,"\r\n")}}).get()}});var jt=/%20/g,qt=/#.*$/,Lt=/([?&])_=[^&]*/,Ht=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ot=/^(?:GET|HEAD)$/,Pt=/^\/\//,Rt={},Mt={},It="*/".concat("*"),Wt=E.createElement("a");function Ft(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(P)||[];if(m(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Bt(t,i,o,a){var s={},u=t===Mt;function l(e){var r;return s[e]=!0,S.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function $t(e,t){var n,r,i=S.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&S.extend(!0,e,r),e}Wt.href=Tt.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Tt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Tt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":It,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":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?$t($t(e,S.ajaxSettings),t):$t(S.ajaxSettings,e)},ajaxPrefilter:Ft(Rt),ajaxTransport:Ft(Mt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=S.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?S(y):S.event,x=S.Deferred(),b=S.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=Ht.exec(p))n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||Tt.href)+"").replace(Pt,Tt.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(P)||[""],null==v.crossDomain){r=E.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Wt.protocol+"//"+Wt.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=S.param(v.data,v.traditional)),Bt(Rt,v,t,T),h)return T;for(i in(g=S.event&&v.global)&&0==S.active++&&S.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Ot.test(v.type),f=v.url.replace(qt,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(jt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(Et.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(Lt,"$1"),o=(Et.test(f)?"&":"?")+"_="+Ct.guid+++o),v.url=f+o),v.ifModified&&(S.lastModified[f]&&T.setRequestHeader("If-Modified-Since",S.lastModified[f]),S.etag[f]&&T.setRequestHeader("If-None-Match",S.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+It+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=Bt(Mt,v,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=C.setTimeout(function(){T.abort("timeout")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&C.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(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]}(v,T,n)),!i&&-1<S.inArray("script",v.dataTypes)&&(v.converters["text script"]=function(){}),s=function(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}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(S.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(S.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--S.active||S.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return S.get(e,t,n,"json")},getScript:function(e,t){return S.get(e,void 0,t,"script")}}),S.each(["get","post"],function(e,i){S[i]=function(e,t,n,r){return m(t)&&(r=r||n,n=t,t=void 0),S.ajax(S.extend({url:e,type:i,dataType:r,data:t,success:n},S.isPlainObject(e)&&e))}}),S.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),S._evalUrl=function(e,t,n){return S.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){S.globalEval(e,t,n)}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=S(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(n){return m(n)?this.each(function(e){S(this).wrapInner(n.call(this,e))}):this.each(function(){var e=S(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=m(t);return this.each(function(e){S(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){S(this).replaceWith(this.childNodes)}),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var _t={0:200,1223:204},zt=S.ajaxSettings.xhr();y.cors=!!zt&&"withCredentials"in zt,y.ajax=zt=!!zt,S.ajaxTransport(function(i){var o,a;if(y.cors||zt&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(_t[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&C.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),S.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),S.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 S.globalEval(e),e}}}),S.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),S.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=S("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=vt(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&S.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?S("<div>").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.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"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.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)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.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,n){S.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var Gt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;S.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||S.guid++,i},S.holdReady=function(e){e?S.readyWait++:S.ready(!0)},S.isArray=Array.isArray,S.parseJSON=JSON.parse,S.nodeName=A,S.isFunction=m,S.isWindow=x,S.camelCase=X,S.type=w,S.now=Date.now,S.isNumeric=function(e){var t=S.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},S.trim=function(e){return null==e?"":(e+"").replace(Gt,"")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return S});var Yt=C.jQuery,Qt=C.$;return S.noConflict=function(e){return C.$===S&&(C.$=Qt),e&&C.jQuery===S&&(C.jQuery=Yt),S},"undefined"==typeof e&&(C.jQuery=C.$=S),S});
4; 5/* AUTOGENERATED: jquery-migrate.min.js */ 6/*! jQuery Migrate v3.3.2 | (c) OpenJS Foundation and other contributors | jquery.org/license */ 7"undefined"==typeof jQuery.migrateMute&&(jQuery.migrateMute=!0),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e,window)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery"),window):t(jQuery,window)}(function(s,n){"use strict";function e(e){return 0<=function(e,t){for(var r=/^(\d+)\.(\d+)\.(\d+)/,n=r.exec(e)||[],o=r.exec(t)||[],i=1;i<=3;i++){if(+o[i]<+n[i])return 1;if(+n[i]<+o[i])return-1}return 0}(s.fn.jquery,e)}s.migrateVersion="3.3.2",n.console&&n.console.log&&(s&&e("3.0.0")||n.console.log("JQMIGRATE: jQuery 3.0.0+ REQUIRED"),s.migrateWarnings&&n.console.log("JQMIGRATE: Migrate plugin loaded multiple times"),n.console.log("JQMIGRATE: Migrate is installed"+(s.migrateMute?"":" with logging active")+", version "+s.migrateVersion));var r={};function u(e){var t=n.console;s.migrateDeduplicateWarnings&&r[e]||(r[e]=!0,s.migrateWarnings.push(e),t&&t.warn&&!s.migrateMute&&(t.warn("JQMIGRATE: "+e),s.migrateTrace&&t.trace&&t.trace()))}function t(e,t,r,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){return u(n),r},set:function(e){u(n),r=e}})}function o(e,t,r,n){e[t]=function(){return u(n),r.apply(this,arguments)}}s.migrateDeduplicateWarnings=!0,s.migrateWarnings=[],void 0===s.migrateTrace&&(s.migrateTrace=!0),s.migrateReset=function(){r={},s.migrateWarnings.length=0},"BackCompat"===n.document.compatMode&&u("jQuery is not compatible with Quirks Mode");var i,a,c,d={},l=s.fn.init,p=s.find,f=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,y=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g,m=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;for(i in s.fn.init=function(e){var t=Array.prototype.slice.call(arguments);return"string"==typeof e&&"#"===e&&(u("jQuery( '#' ) is not a valid selector"),t[0]=[]),l.apply(this,t)},s.fn.init.prototype=s.fn,s.find=function(t){var r=Array.prototype.slice.call(arguments);if("string"==typeof t&&f.test(t))try{n.document.querySelector(t)}catch(e){t=t.replace(y,function(e,t,r,n){return"["+t+r+'"'+n+'"]'});try{n.document.querySelector(t),u("Attribute selector with '#' must be quoted: "+r[0]),r[0]=t}catch(e){u("Attribute selector with '#' was not fixed: "+r[0])}}return p.apply(this,r)},p)Object.prototype.hasOwnProperty.call(p,i)&&(s.find[i]=p[i]);o(s.fn,"size",function(){return this.length},"jQuery.fn.size() is deprecated and removed; use the .length property"),o(s,"parseJSON",function(){return JSON.parse.apply(null,arguments)},"jQuery.parseJSON is deprecated; use JSON.parse"),o(s,"holdReady",s.holdReady,"jQuery.holdReady is deprecated"),o(s,"unique",s.uniqueSort,"jQuery.unique is deprecated; use jQuery.uniqueSort"),t(s.expr,"filters",s.expr.pseudos,"jQuery.expr.filters is deprecated; use jQuery.expr.pseudos"),t(s.expr,":",s.expr.pseudos,"jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos"),e("3.1.1")&&o(s,"trim",function(e){return null==e?"":(e+"").replace(m,"")},"jQuery.trim is deprecated; use String.prototype.trim"),e("3.2.0")&&(o(s,"nodeName",function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},"jQuery.nodeName is deprecated"),o(s,"isArray",Array.isArray,"jQuery.isArray is deprecated; use Array.isArray")),e("3.3.0")&&(o(s,"isNumeric",function(e){var t=typeof e;return("number"==t||"string"==t)&&!isNaN(e-parseFloat(e))},"jQuery.isNumeric() is deprecated"),s.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){d["[object "+t+"]"]=t.toLowerCase()}),o(s,"type",function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?d[Object.prototype.toString.call(e)]||"object":typeof e},"jQuery.type is deprecated"),o(s,"isFunction",function(e){return"function"==typeof e},"jQuery.isFunction() is deprecated"),o(s,"isWindow",function(e){return null!=e&&e===e.window},"jQuery.isWindow() is deprecated")),s.ajax&&(a=s.ajax,c=/(=)\?(?=&|$)|\?\?/,s.ajax=function(){var e=a.apply(this,arguments);return e.promise&&(o(e,"success",e.done,"jQXHR.success is deprecated and removed"),o(e,"error",e.fail,"jQXHR.error is deprecated and removed"),o(e,"complete",e.always,"jQXHR.complete is deprecated and removed")),e},e("4.0.0")||s.ajaxPrefilter("+json",function(e){!1!==e.jsonp&&(c.test(e.url)||"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&c.test(e.data))&&u("JSON-to-JSONP auto-promotion is deprecated")}));var g=s.fn.removeAttr,h=s.fn.toggleClass,v=/\S+/g;function j(e){return e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()})}s.fn.removeAttr=function(e){var r=this;return s.each(e.match(v),function(e,t){s.expr.match.bool.test(t)&&(u("jQuery.fn.removeAttr no longer sets boolean properties: "+t),r.prop(t,!1))}),g.apply(this,arguments)};var Q,b=!(s.fn.toggleClass=function(t){return void 0!==t&&"boolean"!=typeof t?h.apply(this,arguments):(u("jQuery.fn.toggleClass( boolean ) is deprecated"),this.each(function(){var e=this.getAttribute&&this.getAttribute("class")||"";e&&s.data(this,"__className__",e),this.setAttribute&&this.setAttribute("class",!e&&!1!==t&&s.data(this,"__className__")||"")}))}),w=/^[a-z]/,x=/^(?:Border(?:Top|Right|Bottom|Left)?(?:Width|)|(?:Margin|Padding)?(?:Top|Right|Bottom|Left)?|(?:Min|Max)?(?:Width|Height))$/;s.swap&&s.each(["height","width","reliableMarginRight"],function(e,t){var r=s.cssHooks[t]&&s.cssHooks[t].get;r&&(s.cssHooks[t].get=function(){var e;return b=!0,e=r.apply(this,arguments),b=!1,e})}),s.swap=function(e,t,r,n){var o,i,a={};for(i in b||u("jQuery.swap() is undocumented and deprecated"),t)a[i]=e.style[i],e.style[i]=t[i];for(i in o=r.apply(e,n||[]),t)e.style[i]=a[i];return o},e("3.4.0")&&"undefined"!=typeof Proxy&&(s.cssProps=new Proxy(s.cssProps||{},{set:function(){return u("JQMIGRATE: jQuery.cssProps is deprecated"),Reflect.set.apply(this,arguments)}})),s.cssNumber||(s.cssNumber={}),Q=s.fn.css,s.fn.css=function(e,t){var r,n,o=this;return e&&"object"==typeof e&&!Array.isArray(e)?(s.each(e,function(e,t){s.fn.css.call(o,e,t)}),this):("number"==typeof t&&(r=j(e),n=r,w.test(n)&&x.test(n[0].toUpperCase()+n.slice(1))||s.cssNumber[r]||u('Number-typed values are deprecated for jQuery.fn.css( "'+e+'", value )')),Q.apply(this,arguments))};var A,k,S,M,N=s.data;s.data=function(e,t,r){var n,o,i;if(t&&"object"==typeof t&&2===arguments.length){for(i in n=s.hasData(e)&&N.call(this,e),o={},t)i!==j(i)?(u("jQuery.data() always sets/gets camelCased names: "+i),n[i]=t[i]):o[i]=t[i];return N.call(this,e,o),t}return t&&"string"==typeof t&&t!==j(t)&&(n=s.hasData(e)&&N.call(this,e))&&t in n?(u("jQuery.data() always sets/gets camelCased names: "+t),2<arguments.length&&(n[t]=r),n[t]):N.apply(this,arguments)},s.fx&&(S=s.Tween.prototype.run,M=function(e){return e},s.Tween.prototype.run=function(){1<s.easing[this.easing].length&&(u("'jQuery.easing."+this.easing.toString()+"' should use only one argument"),s.easing[this.easing]=M),S.apply(this,arguments)},A=s.fx.interval||13,k="jQuery.fx.interval is deprecated",n.requestAnimationFrame&&Object.defineProperty(s.fx,"interval",{configurable:!0,enumerable:!0,get:function(){return n.document.hidden||u(k),A},set:function(e){u(k),A=e}}));var R=s.fn.load,H=s.event.add,C=s.event.fix;s.event.props=[],s.event.fixHooks={},t(s.event.props,"concat",s.event.props.concat,"jQuery.event.props.concat() is deprecated and removed"),s.event.fix=function(e){var t,r=e.type,n=this.fixHooks[r],o=s.event.props;if(o.length){u("jQuery.event.props are deprecated and removed: "+o.join());while(o.length)s.event.addProp(o.pop())}if(n&&!n._migrated_&&(n._migrated_=!0,u("jQuery.event.fixHooks are deprecated and removed: "+r),(o=n.props)&&o.length))while(o.length)s.event.addProp(o.pop());return t=C.call(this,e),n&&n.filter?n.filter(t,e):t},s.event.add=function(e,t){return e===n&&"load"===t&&"complete"===n.document.readyState&&u("jQuery(window).on('load'...) called after load event occurred"),H.apply(this,arguments)},s.each(["load","unload","error"],function(e,t){s.fn[t]=function(){var e=Array.prototype.slice.call(arguments,0);return"load"===t&&"string"==typeof e[0]?R.apply(this,e):(u("jQuery.fn."+t+"() is deprecated"),e.splice(0,0,t),arguments.length?this.on.apply(this,e):(this.triggerHandler.apply(this,e),this))}}),s.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,r){s.fn[r]=function(e,t){return u("jQuery.fn."+r+"
7() event shorthand is deprecated"),0<arguments.length?this.on(r,null,e,t):this.trigger(r)}}),s(function(){s(n.document).triggerHandler("ready")}),s.event.special.ready={setup:function(){this===n.document&&u("'ready' event is deprecated")}},s.fn.extend({bind:function(e,t,r){return u("jQuery.fn.bind() is deprecated"),this.on(e,null,t,r)},unbind:function(e,t){return u("jQuery.fn.unbind() is deprecated"),this.off(e,null,t)},delegate:function(e,t,r,n){return u("jQuery.fn.delegate() is deprecated"),this.on(t,e,r,n)},undelegate:function(e,t,r){return u("jQuery.fn.undelegate() is deprecated"),1===arguments.length?this.off(e,"**"):this.off(t,e||"**",r)},hover:function(e,t){return u("jQuery.fn.hover() is deprecated"),this.on("mouseenter",e).on("mouseleave",t||e)}});function T(e){var t=n.document.implementation.createHTMLDocument("");return t.body.innerHTML=e,t.body&&t.body.innerHTML}function P(e){var t=e.replace(O,"<$1></$2>");t!==e&&T(e)!==T(t)&&u("HTML tags must be properly nested and closed: "+e)}var O=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,q=s.htmlPrefilter;s.UNSAFE_restoreLegacyHtmlPrefilter=function(){s.htmlPrefilter=function(e){return P(e),e.replace(O,"<$1></$2>")}},s.htmlPrefilter=function(e){return P(e),q(e)};var D,_=s.fn.offset;s.fn.offset=function(){var e=this[0];return!e||e.nodeType&&e.getBoundingClientRect?_.apply(this,arguments):(u("jQuery.fn.offset() requires a valid DOM element"),arguments.length?this:void 0)},s.ajax&&(D=s.param,s.param=function(e,t){var r=s.ajaxSettings&&s.ajaxSettings.traditional;return void 0===t&&r&&(u("jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),t=r),D.call(this,e,t)});var E,F,J=s.fn.andSelf||s.fn.addBack;return s.fn.andSelf=function(){return u("jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"),J.apply(this,arguments)},s.Deferred&&(E=s.Deferred,F=[["resolve","done",s.Callbacks("once memory"),s.Callbacks("once memory"),"resolved"],["reject","fail",s.Callbacks("once memory"),s.Callbacks("once memory"),"rejected"],["notify","progress",s.Callbacks("memory"),s.Callbacks("memory")]],s.Deferred=function(e){var i=E(),a=i.promise();return i.pipe=a.pipe=function(){var o=arguments;return u("deferred.pipe() is deprecated"),s.Deferred(function(n){s.each(F,function(e,t){var r="function"==typeof o[e]&&o[e];i[t[1]](function(){var e=r&&r.apply(this,arguments);e&&"function"==typeof e.promise?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[t[0]+"With"](this===a?n.promise():this,r?[e]:arguments)})}),o=null}).promise()},e&&e.call(i,i),i},s.Deferred.exceptionHook=E.exceptionHook),s});; 8/* AUTOGENERATED: jquery-ui.min.js */
vendor: 33,137 bytes, lines 9-14
9/*! jQuery UI - v1.12.1 - 2016-09-14 10* http://jqueryui.com 11* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js 12* Copyright jQuery Foundation and other contributors; Licensed MIT */ 13 14(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)})(function(t){function e(t){for(var e=t.css("visibility");"inherit"===e;)t=t.parent(),e=t.css("visibility");return"hidden"!==e}function i(t){for(var e,i;t.length&&t[0]!==document;){if(e=t.css("position"),("absolute"===e||"relative"===e||"fixed"===e)&&(i=parseInt(t.css("zIndex"),10),!isNaN(i)&&0!==i))return i;t=t.parent()}return 0}function s(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-US"]=t.extend(!0,{},this.regional.en),this.dpDiv=n(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function n(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",i,function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",i,o)}function o(){t.datepicker._isDisabledDatepicker(m.inline?m.dpDiv.parent()[0]:m.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))}function a(e,i){t.extend(e,i);for(var s in i)null==i[s]&&(e[s]=i[s]);return e}function r(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.ui=t.ui||{},t.ui.version="1.12.1";var h=0,l=Array.prototype.slice;t.cleanData=function(e){return function(i){var s,n,o;for(o=0;null!=(n=i[o]);o++)try{s=t._data(n,"events"),s&&s.remove&&t(n).triggerHandler("remove")}catch(a){}e(i)}}(t.cleanData),t.widget=function(e,i,s){var n,o,a,r={},h=e.split(".")[0];e=e.split(".")[1];var l=h+"-"+e;return s||(s=i,i=t.Widget),t.isArray(s)&&(s=t.extend.apply(null,[{}].concat(s))),t.expr[":"][l.toLowerCase()]=function(e){return!!t.data(e,l)},t[h]=t[h]||{},n=t[h][e],o=t[h][e]=function(t,e){return this._createWidget?(arguments.length&&this._createWidget(t,e),void 0):new o(t,e)},t.extend(o,n,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(s,function(e,s){return t.isFunction(s)?(r[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=n,e=s.apply(this,arguments),this._super=i,this._superApply=o,e}}(),void 0):(r[e]=s,void 0)}),o.prototype=t.widget.extend(a,{widgetEventPrefix:n?a.widgetEventPrefix||e:e},r,{constructor:o,namespace:h,widgetName:e,widgetFullName:l}),n?(t.each(n._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete n._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var i,s,n=l.call(arguments,1),o=0,a=n.length;a>o;o++)for(i in n[o])s=n[o][i],n[o].hasOwnProperty(i)&&void 0!==s&&(e[i]=t.isPlainObject(s)?t.isPlainObject(e[i])?t.widget.extend({},e[i],s):t.widget.extend({},s):s);return e},t.widget.bridge=function(e,i){var s=i.prototype.widgetFullName||e;t.fn[e]=function(n){var o="string"==typeof n,a=l.call(arguments,1),r=this;return o?this.length||"instance"!==n?this.each(function(){var i,o=t.data(this,s);return"instance"===n?(r=o,!1):o?t.isFunction(o[n])&&"_"!==n.charAt(0)?(i=o[n].apply(o,a),i!==o&&void 0!==i?(r=i&&i.jquery?r.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+n+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+n+"'")}):r=void 0:(a.length&&(n=t.widget.extend.apply(null,[n].concat(a))),this.each(function(){var e=t.data(this,s);e?(e.option(n||{}),e._init&&e._init()):t.data(this,s,new i(n,this))})),r}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=h++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+o.eventNamespace,c=h[2];c?n.on(l,c,r):i.on(l,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,h=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,o="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:o?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType,o=!s&&!n;return{element:i,isWindow:s,isDocument:n,offset:o?t(e).offset():{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:i.outerWidth(),height:i.outerHeight()}}},t.fn.position=function(n){if(!n||!n.of)return d.apply(this,arguments);n=t.extend({},n);var u,p,f,g,m,_,v=t(n.of),b=t.position.getWithinInfo(n.within),y=t.position.getScrollInfo(b),w=(n.collision||"flip").split(" "),k={};return _=s(v),v[0].preventDefault&&(n.at="left top"),p=_.width,f=_.height,g=_.offset,m=t.extend({},g),t.each(["my","at"],function(){var t,e,i=(n[this]||"").split(" ");1===i.length&&(i=r.test(i[0])?i.concat(["center"]):h.test(i[0])?["center"].concat(i):["center","center"]),i[0]=r.test(i[0])?i[0]:"center",i[1]=h.test(i[1])?i[1]:"center",t=l.exec(i[0]),e=l.exec(i[1]),k[this]=[t?t[0]:0,e?e[0]:0],n[this]=[c.exec(i[0])[0],c.exec(i[1])[0]]}),1===w.length&&(w[1]=w[0]),"right"===n.at[0]?m.left+=p:"center"===n.at[0]&&(m.left+=p/2),"bottom"===n.at[1]?m.top+=f:"center"===n.at[1]&&(m.top+=f/2),u=e(k.at,p,f),m.left+=u[0],m.top+=u[1],this.each(function(){var s,r,h=t(this),l=h.outerWidth(),c=h.outerHeight(),d=i(this,"marginLeft"),_=i(this,"marginTop"),x=l+d+i(this,"marginRight")+y.width,C=c+_+i(this,"marginBottom")+y.height,D=t.extend({},m),I=e(k.my,h.outerWidth(),h.outerHeight());"right"===n.my[0]?D.left-=l:"center"===n.my[0]&&(D.left-=l/2),"bottom"===n.my[1]?D.top-=c:"center"===n.my[1]&&(D.top-=c/2),D.left+=I[0],D.top+=I[1],s={marginLeft:d,marginTop:_},t.each(["left","top"],function(e,i){t.ui.position[w[e]]&&t.ui.position[w[e]][i](D,{targetWidth:p,targetHeight:f,elemWidth:l,elemHeight:c,collisionPosition:s,collisionWidth:x,collisionHeight:C,offset:[u[0]+I[0],u[1]+I[1]],my:n.my,at:n.at,within:b,elem:h})}),n.using&&(r=function(t){var e=g.left-D.left,i=e+p-l,s=g.top-D.top,r=s+f-c,u={target:{element:v,left:g.left,top:g.top,width:p,height:f},element:{element:h,left:D.left,top:D.top,width:l,height:c},horizontal:0>i?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};l>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),h.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-r-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-r-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-h,(i>0||u>a(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])}}),t.fn.extend({disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}});var c="ui-effects-",u="ui-effects-style",d="ui-effects-animated",p=t;t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(t,o){var a,r=o.re.exec(i),h=r&&o.parse(r),l=o.space||"rgba";return h?(a=s[l](h),s[c[l].cache]=a[c[l].cache],n=s._rgba=a._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,o.transparent),s):o[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var o,a="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],l=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=l.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),l.fn=t.extend(l.prototype,{parse:function(n,a,r,h){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(a),a=e);var u=this,d=t.type(n),p=this._rgba=[];return a!==e&&(n=[n,a,r,h],d="array"),"string"===d?this.parse(s(n)||o._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof l?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var o=s.cache;f(s.props,function(t,e){if(!u[o]&&s.to){if("alpha"===t||null==n[t])return;u[o]=s.to(u._rgba)}u[o][e.idx]=i(n[t],e,!0)}),u[o]&&0>t.inArray(null,u[o].slice(0,3))&&(u[o][3]=1,s.from&&(u._rgba=s.from(u[o])))}),this):e},is:function(t){var i=l(t),s=!0,n=this;return f(c,function(t,o){var a,r=i[o.cache];return r&&(a=n[o.cache]||o.to&&o.to(n._rgba)||[],f(o.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===a[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=l(t),n=s._space(),o=c[n],a=0===this.alpha()?l("transparent"):this,r=a[o.cache]||o.to(a._rgba),h=r.slice();return s=s[o.cache],f(o.props,function(t,n){var o=n.idx,a=r[o],l=s[o],c=u[n.type]||{};null!==l&&(null===a?h[o]=l:(c.mod&&(l-a>c.mod/2?a+=c.mod:a-l>c.mod/2&&(a-=c.mod)),h[o]=i((l-a)*e+a,n)))}),this[n](h)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(e)._rgba;return l(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,o=t[2]/255,a=t[3],r=Math.max(s,n,o),h=Math.min(s,n,o),l=r-h,c=r+h,u=.5*c;return e=h===r?0:s===r?60*(n-o)/l+360:n===r?60*(o-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=u?l/c:l/(2-c),[Math.round(e)%360,i,u,null==a?1:a]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],o=t[3],a=.5>=s?s*(1+i):s+i-s*i,r=2*s-a;return[Math.round(255*n(r,a,e+1/3)),Math.round(255*n(r,a,e)),Math.round(255*n(r,a,e-1/3)),o]},f(c,function(s,n){var o=n.props,a=n.cache,h=n.to,c=n.from;l.fn[s]=function(s){if(h&&!this[a]&&(this[a]=h(this._rgba)),s===e)return this[a].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[a].slice();return f(o,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=l(c(d)),n[a]=d,n):l(d)},f(o,function(e,i){l.fn[e]||(l.fn[e]=function(n){var o,a=t.type(n),h="alpha"===e?this._hsla?"hsla":"rgba":s,l=this[h](),c=l[i.idx];return"undefined"===a?c:("function"===a&&(n=n.call(this,c),a=t.type(n)),null==n&&i.empty?this:("string"===a&&(o=r.exec(n),o&&(n=c+parseFloat(o[2])*("+"===o[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var o,a,r="";if("transparent"!==n&&("string"!==t.type(n)||(o=s(n)))){if(n=l(o||n),!d.rgba&&1!==n._rgba[3]){for(a="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&a&&a.style;)try{r=t.css(a,"backgroundColor"),a=a.parentNode}catch(h){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(h){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=l(e.elem,i),e.end=l(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},l.hook(a),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},o=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(p),function(){function e(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(o[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(o[i]=n[i]);return o}function i(e,i){var s,o,a={};for(s in i)o=i[s],e[s]!==o&&(n[s]||(t.fx.step[s]||!isNaN(parseFloat(o)))&&(a[s]=o));return a}var s=["add","remove","toggle"],n={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(p.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(n,o,a,r){var h=t.speed(o,a,r);return this.queue(function(){var o,a=t(this),r=a.attr("class")||"",l=h.children?a.find("*").addBack():a;l=l.map(function(){var i=t(this);return{el:i,start:e(this)}}),o=function(){t.each(s,function(t,e){n[e]&&a[e+"Class"](n[e])})},o(),l=l.map(function(){return this.end=e(this.el[0]),this.diff=i(this.start,this.end),this}),a.attr("class",r),l=l.map(function(){var e=this,i=t.Deferred(),s=t.extend({},h,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,l.get()).done(function(){o(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),h.complete.call(a[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,o){return s?t.effects.animateClass.call(this,{add:i},s,n,o):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,o):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(i,s,n,o,a){return"boolean"==typeof s||void 0===s?n?t.effects.animateClass.call(this,s?{add:i}:{remove:i},n,o,a):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:i},s,n,o)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,o){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,o)}})}(),function(){function e(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function i(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}function s(t,e){var i=e.outerWidth(),s=e.outerHeight(),n=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,o=n.exec(t)||["",0,i,s,0];return{top:parseFloat(o[1])||0,right:"auto"===o[2]?i:parseFloat(o[2]),bottom:"auto"===o[3]?s:parseFloat(o[3]),left:parseFloat(o[4])||0}}t.expr&&t.expr.filters&&t.expr.filters.animated&&(t.expr.filters.animated=function(e){return function(i){return!!t(i).data(d)||e(i)}}(t.expr.filters.animated)),t.uiBackCompat!==!1&&t.extend(t.effects,{save:function(t,e){for(var i=0,s=e.length;s>i;i++)null!==e[i]&&t.data(c+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,s=0,n=e.length;n>s;s++)null!==e[s]&&(i=t.data(c+e[s]),t.css(e[s],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(a){o=document.body}return e.wrap(s),(e[0]===o||t.contains(e[0],o))&&t(o).trigger("focus"),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).trigger("focus")),e}}),t.extend(t.effects,{version:"1.12.1",define:function(e,i,s){return s||(s=i,i="effect"),t.effects.effect[e]=s,t.effects.effect[e].mode=i,s},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var s="horizontal"!==i?(e||100)/100:1,n="vertical"!==i?(e||100)/100:1;return{height:t.height()*n,width:t.width()*s,outerHeight:t.outerHeight()*n,outerWidth:t.outerWidth()*s}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var s=t.queue();e>1&&s.splice.apply(s,[1,0].concat(s.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data(u,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(u)||"",t.removeData(u)},mode:function(t,e){var i=t.is(":hidden");return"toggle"===e&&(e=i?"show":"hide"),(i?"hide"===e:"show"===e)&&(e="none"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createPlaceholder:function(e){var i,s=e.css("position"),n=e.position();return e.css({marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()),/^(static|relative)/.test(s)&&(s="absolute",i=t("<"+e[0].nodeName+">").insertAfter(e).css({display:/^(inline|ruby)/.test(e.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight"),"float":e.css("float")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).addClass("ui-effects-placeholder"),e.data(c+"placeholder",i)),e.css({position:s,left:n.left,top:n.top}),i},removePlaceholder:function(t){var e=c+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(e){t.effects.restoreStyle(e),t.effects.removePlaceholder(e)},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var o=e.cssUnit(i);o[0]>0&&(n[i]=o[0]*s+o[1])}),n}}),t.fn.extend({effect:function(){function i(e){function i(){r.removeData(d),t.effects.cleanUp(r),"hide"===s.mode&&r.hide(),a()}function a(){t.isFunction(h)&&h.call(r[0]),t.isFunction(e)&&e()}var r=t(this);s.mode=c.shift(),t.uiBackCompat===!1||o?"none"===s.mode?(r[l](),a()):n.call(r[0],s,i):(r.is(":hidden")?"hide"===l:"show"===l)?(r[l](),a()):n.call(r[0],s,a)}var s=e.apply(this,arguments),n=t.effects.effect[s.effect],o=n.mode,a=s.queue,r=a||"fx",h=s.complete,l=s.mode,c=[],u=function(e){var i=t(this),s=t.effects.mode(i,l)||o;i.data(d,!0),c.push(s),o&&("show"===s||s===o&&"hide"===s)&&i.show(),o&&"none"===s||t.effects.saveStyle(i),t.isFunction(e)&&e()};return t.fx.off||!n?l?this[l](s.duration,h):this.each(function(){h&&h.call(this)}):a===!1?this.each(u).each(i):this.queue(r,u).queue(r,i)},show:function(t){return function(s){if(i(s))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="show",this.effect.call(this,n)
15
vendor: 32,074 bytes, line 15
15}}(t.fn.show),hide:function(t){return function(s){if(i(s))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="hide",this.effect.call(this,n)}}(t.fn.hide),toggle:function(t){return function(s){if(i(s)||"boolean"==typeof s)return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):s(this.css("clip"),this)},transfer:function(e,i){var s=t(this),n=t(e.to),o="fixed"===n.css("position"),a=t("body"),r=o?a.scrollTop():0,h=o?a.scrollLeft():0,l=n.offset(),c={top:l.top-r,left:l.left-h,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(e.className).css({top:u.top-r,left:u.left-h,height:s.innerHeight(),width:s.innerWidth(),position:o?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),t.isFunction(i)&&i()})}}),t.fx.step.clip=function(e){e.clipInit||(e.start=t(e.elem).cssClip(),"string"==typeof e.end&&(e.end=s(e.end,e.elem)),e.clipInit=!0),t(e.elem).cssClip({top:e.pos*(e.end.top-e.start.top)+e.start.top,right:e.pos*(e.end.right-e.start.right)+e.start.right,bottom:e.pos*(e.end.bottom-e.start.bottom)+e.start.bottom,left:e.pos*(e.end.left-e.start.left)+e.start.left})}}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}();var f=t.effects;t.effects.define("blind","hide",function(e,i){var s={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},n=t(this),o=e.direction||"up",a=n.cssClip(),r={clip:t.extend({},a)},h=t.effects.createPlaceholder(n);r.clip[s[o][0]]=r.clip[s[o][1]],"show"===e.mode&&(n.cssClip(r.clip),h&&h.css(t.effects.clipToBox(r)),r.clip=a),h&&h.animate(t.effects.clipToBox(r),e.duration,e.easing),n.animate(r,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("bounce",function(e,i){var s,n,o,a=t(this),r=e.mode,h="hide"===r,l="show"===r,c=e.direction||"up",u=e.distance,d=e.times||5,p=2*d+(l||h?1:0),f=e.duration/p,g=e.easing,m="up"===c||"down"===c?"top":"left",_="up"===c||"left"===c,v=0,b=a.queue().length;for(t.effects.createPlaceholder(a),o=a.css(m),u||(u=a["top"===m?"outerHeight":"outerWidth"]()/3),l&&(n={opacity:1},n[m]=o,a.css("opacity",0).css(m,_?2*-u:2*u).animate(n,f,g)),h&&(u/=Math.pow(2,d-1)),n={},n[m]=o;d>v;v++)s={},s[m]=(_?"-=":"+=")+u,a.animate(s,f,g).animate(n,f,g),u=h?2*u:u/2;h&&(s={opacity:0},s[m]=(_?"-=":"+=")+u,a.animate(s,f,g)),a.queue(i),t.effects.unshift(a,b,p+1)}),t.effects.define("clip","hide",function(e,i){var s,n={},o=t(this),a=e.direction||"vertical",r="both"===a,h=r||"horizontal"===a,l=r||"vertical"===a;s=o.cssClip(),n.clip={top:l?(s.bottom-s.top)/2:s.top,right:h?(s.right-s.left)/2:s.right,bottom:l?(s.bottom-s.top)/2:s.bottom,left:h?(s.right-s.left)/2:s.left},t.effects.createPlaceholder(o),"show"===e.mode&&(o.cssClip(n.clip),n.clip=s),o.animate(n,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("drop","hide",function(e,i){var s,n=t(this),o=e.mode,a="show"===o,r=e.direction||"left",h="up"===r||"down"===r?"top":"left",l="up"===r||"left"===r?"-=":"+=",c="+="===l?"-=":"+=",u={opacity:0};t.effects.createPlaceholder(n),s=e.distance||n["top"===h?"outerHeight":"outerWidth"](!0)/2,u[h]=l+s,a&&(n.css(u),u[h]=c+s,u.opacity=1),n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("explode","hide",function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(b).remove(),i()}var o,a,r,h,l,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=e.mode,g="show"===f,m=p.show().css("visibility","hidden").offset(),_=Math.ceil(p.outerWidth()/d),v=Math.ceil(p.outerHeight()/u),b=[];for(o=0;u>o;o++)for(h=m.top+o*v,c=o-(u-1)/2,a=0;d>a;a++)r=m.left+a*_,l=a-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-a*_,top:-o*v}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:_,height:v,left:r+(g?l*_:0),top:h+(g?c*v:0),opacity:g?0:1}).animate({left:r+(g?0:l*_),top:h+(g?0:c*v),opacity:g?1:0},e.duration||500,e.easing,s)}),t.effects.define("fade","toggle",function(e,i){var s="show"===e.mode;t(this).css("opacity",s?0:1).animate({opacity:s?1:0},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("fold","hide",function(e,i){var s=t(this),n=e.mode,o="show"===n,a="hide"===n,r=e.size||15,h=/([0-9]+)%/.exec(r),l=!!e.horizFirst,c=l?["right","bottom"]:["bottom","right"],u=e.duration/2,d=t.effects.createPlaceholder(s),p=s.cssClip(),f={clip:t.extend({},p)},g={clip:t.extend({},p)},m=[p[c[0]],p[c[1]]],_=s.queue().length;h&&(r=parseInt(h[1],10)/100*m[a?0:1]),f.clip[c[0]]=r,g.clip[c[0]]=r,g.clip[c[1]]=0,o&&(s.cssClip(g.clip),d&&d.css(t.effects.clipToBox(g)),g.clip=p),s.queue(function(i){d&&d.animate(t.effects.clipToBox(f),u,e.easing).animate(t.effects.clipToBox(g),u,e.easing),i()}).animate(f,u,e.easing).animate(g,u,e.easing).queue(i),t.effects.unshift(s,_,4)}),t.effects.define("highlight","show",function(e,i){var s=t(this),n={backgroundColor:s.css("backgroundColor")};"hide"===e.mode&&(n.opacity=0),t.effects.saveStyle(s),s.css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(n,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("size",function(e,i){var s,n,o,a=t(this),r=["fontSize"],h=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],l=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],c=e.mode,u="effect"!==c,d=e.scale||"both",p=e.origin||["middle","center"],f=a.css("position"),g=a.position(),m=t.effects.scaledDimensions(a),_=e.from||m,v=e.to||t.effects.scaledDimensions(a,0);t.effects.createPlaceholder(a),"show"===c&&(o=_,_=v,v=o),n={from:{y:_.height/m.height,x:_.width/m.width},to:{y:v.height/m.height,x:v.width/m.width}},("box"===d||"both"===d)&&(n.from.y!==n.to.y&&(_=t.effects.setTransition(a,h,n.from.y,_),v=t.effects.setTransition(a,h,n.to.y,v)),n.from.x!==n.to.x&&(_=t.effects.setTransition(a,l,n.from.x,_),v=t.effects.setTransition(a,l,n.to.x,v))),("content"===d||"both"===d)&&n.from.y!==n.to.y&&(_=t.effects.setTransition(a,r,n.from.y,_),v=t.effects.setTransition(a,r,n.to.y,v)),p&&(s=t.effects.getBaseline(p,m),_.top=(m.outerHeight-_.outerHeight)*s.y+g.top,_.left=(m.outerWidth-_.outerWidth)*s.x+g.left,v.top=(m.outerHeight-v.outerHeight)*s.y+g.top,v.left=(m.outerWidth-v.outerWidth)*s.x+g.left),a.css(_),("content"===d||"both"===d)&&(h=h.concat(["marginTop","marginBottom"]).concat(r),l=l.concat(["marginLeft","marginRight"]),a.find("*[width]").each(function(){var i=t(this),s=t.effects.scaledDimensions(i),o={height:s.height*n.from.y,width:s.width*n.from.x,outerHeight:s.outerHeight*n.from.y,outerWidth:s.outerWidth*n.from.x},a={height:s.height*n.to.y,width:s.width*n.to.x,outerHeight:s.height*n.to.y,outerWidth:s.width*n.to.x};n.from.y!==n.to.y&&(o=t.effects.setTransition(i,h,n.from.y,o),a=t.effects.setTransition(i,h,n.to.y,a)),n.from.x!==n.to.x&&(o=t.effects.setTransition(i,l,n.from.x,o),a=t.effects.setTransition(i,l,n.to.x,a)),u&&t.effects.saveStyle(i),i.css(o),i.animate(a,e.duration,e.easing,function(){u&&t.effects.restoreStyle(i)})})),a.animate(v,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){var e=a.offset();0===v.opacity&&a.css("opacity",_.opacity),u||(a.css("position","static"===f?"relative":f).offset(e),t.effects.saveStyle(a)),i()}})}),t.effects.define("scale",function(e,i){var s=t(this),n=e.mode,o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"effect"!==n?0:100),a=t.extend(!0,{from:t.effects.scaledDimensions(s),to:t.effects.scaledDimensions(s,o,e.direction||"both"),origin:e.origin||["middle","center"]},e);e.fade&&(a.from.opacity=1,a.to.opacity=0),t.effects.effect.size.call(this,a,i)}),t.effects.define("puff","hide",function(e,i){var s=t.extend(!0,{},e,{fade:!0,percent:parseInt(e.percent,10)||150});t.effects.effect.scale.call(this,s,i)}),t.effects.define("pulsate","show",function(e,i){var s=t(this),n=e.mode,o="show"===n,a="hide"===n,r=o||a,h=2*(e.times||5)+(r?1:0),l=e.duration/h,c=0,u=1,d=s.queue().length;for((o||!s.is(":visible"))&&(s.css("opacity",0).show(),c=1);h>u;u++)s.animate({opacity:c},l,e.easing),c=1-c;s.animate({opacity:c},l,e.easing),s.queue(i),t.effects.unshift(s,d,h+1)}),t.effects.define("shake",function(e,i){var s=1,n=t(this),o=e.direction||"left",a=e.distance||20,r=e.times||3,h=2*r+1,l=Math.round(e.duration/h),c="up"===o||"down"===o?"top":"left",u="up"===o||"left"===o,d={},p={},f={},g=n.queue().length;for(t.effects.createPlaceholder(n),d[c]=(u?"-=":"+=")+a,p[c]=(u?"+=":"-=")+2*a,f[c]=(u?"-=":"+=")+2*a,n.animate(d,l,e.easing);r>s;s++)n.animate(p,l,e.easing).animate(f,l,e.easing);n.animate(p,l,e.easing).animate(d,l/2,e.easing).queue(i),t.effects.unshift(n,g,h+1)}),t.effects.define("slide","show",function(e,i){var s,n,o=t(this),a={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},r=e.mode,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h,u=e.distance||o["top"===l?"outerHeight":"outerWidth"](!0),d={};t.effects.createPlaceholder(o),s=o.cssClip(),n=o.position()[l],d[l]=(c?-1:1)*u+n,d.clip=o.cssClip(),d.clip[a[h][1]]=d.clip[a[h][0]],"show"===r&&(o.cssClip(d.clip),o.css(l,d[l]),d.clip=s,d[l]=n),o.animate(d,{queue:!1,duration:e.duration,easing:e.easing,complete:i})});var f;t.uiBackCompat!==!1&&(f=t.effects.define("transfer",function(e,i){t(this).transfer(e,i)})),t.ui.focusable=function(i,s){var n,o,a,r,h,l=i.nodeName.toLowerCase();return"area"===l?(n=i.parentNode,o=n.name,i.href&&o&&"map"===n.nodeName.toLowerCase()?(a=t("img[usemap='#"+o+"']"),a.length>0&&a.is(":visible")):!1):(/^(input|select|textarea|button|object)$/.test(l)?(r=!i.disabled,r&&(h=t(i).closest("fieldset")[0],h&&(r=!h.disabled))):r="a"===l?i.href||s:s,r&&t(i).is(":visible")&&e(t(i)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}}),t.ui.focusable,t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var i=e.data("ui-form-reset-instances");t.each(i,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["Width","Height"],function(e,i){function s(e,i,s,o){return t.each(n,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?a["inner"+i].call(this):this.each(function(){t(this).css(o,s(this,e)+"px")})},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?a["outer"+i].call(this,e):this.each(function(){t(this).css(o,s(this,e,!0,n)+"px")})}}),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.ui.escapeSelector=function(){var t=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),t.fn.labels=function(){var e,i,s,n,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(n=this.eq(0).parents("label"),s=this.attr("id"),s&&(e=this.eq(0).parents().last(),o=e.add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeSelector(s)+"']",n=n.add(o.find(i).addBack(i))),this.pushStack(n))},t.fn.scrollParent=function(e){var i=this.css("position"),s="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return s&&"static"===e.css("position")?!1:n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},t.extend(t.expr[":"],{tabbable:function(e){var i=t.attr(e,"tabindex"),s=null!=i;return(!s||i>=0)&&t.ui.focusable(e,s)}}),t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.widget("ui.accordion",{version:"1.12.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:"> li > :first-child, > :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),e.collapsible||e.active!==!1&&null!=e.active||(e.active=0),this._processPanels(),0>e.active&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t()}},_createIcons:function(){var e,i,s=this.options.icons;s&&(e=t("<span>"),this._addClass(e,"ui-accordion-header-icon","ui-icon "+s.header),e.prependTo(this.headers),i=this.active.children(".ui-accordion-header-icon"),this._removeClass(i,s.header)._addClass(i,null,s.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?(this._activate(e),void 0):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||this.options.active!==!1||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons()),void 0)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!t)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,s=this.headers.length,n=this.headers.index(e.target),o=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:o=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:o=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:o=this.headers[0];break;case i.END:o=this.headers[s-1]}o&&(t(e.target).attr("tabIndex",-1),t(o).attr("tabIndex",0),t(o).trigger("focus"),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().trigger("focus")},refresh:function(){var e=this.options;this._processPanels(),e.active===!1&&e.collapsible===!0||!this.headers.length?(e.active=!1,this.active=t()):e.active===!1?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var e,i=this.options,s=i.heightStyle,n=this.element.parent();this.active=this._findActive(i.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var e=t(this),i=e.uniqueId().attr("id"),s=e.next(),n=s.uniqueId().attr("id");e.attr("aria-controls",n),s.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(i.event),"fill"===s?(e=n.height(),this.element.siblings(":visible").each(function(){var i=t(this),s=i.css("position");"absolute"!==s&&"fixed"!==s&&(e-=i.outerHeight(!0))}),this.headers.each(function(){e-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,e-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===s&&(e=0,this.headers.next().each(function(){var i=t(this).is(":visible");i||t(this).show(),e=Math.max(e,t(this).css("height","").height()),i||t(this).hide()}).height(e))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i,s,n=this.options,o=this.active,a=t(e.currentTarget),r=a[0]===o[0],h=r&&n.collapsible,l=h?t():a.next(),c=o.next(),u={oldHeader:o,oldPanel:c,newHeader:h?t():a,newPanel:l};e.preventDefault(),r&&!n.collapsible||this._trigger("beforeActivate",e,u)===!1||(n.active=h?!1:this.headers.index(a),this.active=r?t():a,this._toggle(u),this._removeClass(o,"ui-accordion-header-active","ui-state-active"),n.icons&&(i=o.children(".ui-accordion-header-icon"),this._removeClass(i,null,n.icons.activeHeader)._addClass(i,null,n.icons.header)),r||(this._removeClass(a,"ui-accordion-header-collapsed")._addClass(a,"ui-accordion-header-active","ui-state-active"),n.icons&&(s=a.children(".ui-accordion-header-icon"),this._removeClass(s,null,n.icons.header)._addClass(s,null,n.icons.activeHeader)),this._addClass(a.next(),"ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,s=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,e):(s.hide(),i.show(),this._toggleComplete(e)),s.attr({"aria-hidden":"true"}),s.prev().attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&s.length?s.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===parseInt(t(this).attr("tabIndex"),10)}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,e,i){var s,n,o,a=this,r=0,h=t.css("box-sizing"),l=t.length&&(!e.length||t.index()<e.index()),c=this.options.animate||{},u=l&&c.down||c,d=function(){a._toggleComplete(i)};return"number"==typeof u&&(o=u),"string"==typeof u&&(n=u),n=n||u.easing||c.easing,o=o||u.duration||c.duration,e.length?t.length?(s=t.show().outerHeight(),e.animate(this.hideProps,{duration:o,easing:n,step:function(t,e){e.now=Math.round(t)}}),t.hide().animate(this.showProps,{duration:o,easing:n,complete:d,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?"content-box"===h&&(r+=i.now):"content"!==a.options.heightStyle&&(i.now=Math.round(s-e.outerHeight()-r),r=0)}}),void 0):e.animate(this.hideProps,o,n,d):t.animate(this.showProps,o,n,d)},_toggleComplete:function(t){var e=t.oldPanel,i=e.prev();this._removeClass(e,"ui-accordion-content-active"),this._removeClass(i,"ui-accordion-header-active")._addClass(i,"ui-accordion-header-collapsed"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}}),t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(i){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},t.widget("ui.menu",{version:"1.12.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var i=t(e.target),s=t(t.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&s.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var i=t(e.target).closest(".ui-menu-item"),s=t(e.currentTarget);i[0]===s[0]&&(this._removeClass(s.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,s))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){var i=!t.contains(this.element[0],t.ui.safeActiveElement(this.document[0]));i&&this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled"),i=e.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),i.children().each(function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var i,s,n,o,a=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:a=!1,s=this.previousFilter||"",o=!1,n=e.keyCode>=96&&105>=e.keyCode?""+(e.keyCode-96):String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),n===s?o=!0:n=s+n,i=this._filterMenuItems(n),i=o&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(n=String.fromCharCode(e.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(e,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}a&&e.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i,s,n,o,a=this,r=this.options.icons.submenu,h=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),s=h.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),i=e.prev(),s=t("<span>").data("ui-menu-submenu-caret",!0);a._addClass(s,"ui-menu-icon","ui-icon "+r),i.attr("aria-haspopup","true").prepend(s),e.attr("aria-labelledby",i.attr("id"))}),this._addClass(s,"ui-menu","ui-widget ui-widget-content ui-front"),e=h.add(this.element),i=e.find(this.options.items),i.not(".ui-menu-item").each(function(){var e=t(this);a._isDivider(e)&&a._addClass(e,"ui-menu-divider","ui-widget-content")}),n=i.not(".ui-menu-item, .ui-menu-divider"),o=n.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(n,"ui-menu-item")._addClass(o,"ui-menu-item-wrapper"),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t+""),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,s,n;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children(".ui-menu-item-wrapper"),this._addClass(s,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),n=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.outerHeight(),0>n?this.activeMenu.scrollTop(o+n):n+r>a&&this.activeMenu.scrollTop(o+n-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this._removeClass(s.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(e),void 0)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items).first())),void 0):(this.next(e),void 0)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)},_filterMenuItems:function(e){var i=e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),s=RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return s.test(t.trim(t(this).children(".ui-menu-item-wrapper").text()))})}}),t.widget("ui.autocomplete",{version:"1.12.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),o="textarea"===n,a="input"===n;
16
vendor: 32,597 bytes, line 16
16this.isMultiLine=o||!a&&this._isContentEditable(this.element),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,void 0;e=!1,s=!1,i=!1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case o.UP:e=!0,this._keyEvent("previous",n);break;case o.DOWN:e=!0,this._keyEvent("next",n);break;case o.ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case o.TAB:this.menu.active&&this.menu.select(n);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),void 0;if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,t.preventDefault(),void 0):(this._searchTimeout(t),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(t),this._change(t),void 0)}}),this._initSource(),this.menu=t("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==t.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(e,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type))?(this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),void 0):(n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:n})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(n.value),s=i.item.attr("aria-label")||n.value,s&&t.trim(s).length&&(this.liveRegion.children().hide(),t("<div>").text(s).appendTo(this.liveRegion)),void 0)},menuselect:function(e,i){var s=i.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==t.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=s})),!1!==this._trigger("select",e,{item:s})&&this._value(s.value),this.term=this._value(),this.close(e),this.selectedItem=s}}),this.liveRegion=t("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var i=this.menu.element[0];return e.target===this.element[0]||e.target===i||t.contains(i,e.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),i=this.menu.element.is(":visible"),s=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;(!e||e&&!i&&!s)&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):void 0},_search:function(t){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return t.proxy(function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")},this)},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({},e,{label:e.label||e.value,value:e.value||e.label})})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var s=this;t.each(i,function(t,i){s._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<div>").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[t](e),void 0):(this.search(null,e),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("<div>").text(i).appendTo(this.liveRegion))}}),t.ui.autocomplete;var g=/ui-corner-([a-z]){2,6}/g;t.widget("ui.controlgroup",{version:"1.12.1",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var e=this,i=[];t.each(this.options.items,function(s,n){var o,a={};return n?"controlgroupLabel"===s?(o=e.element.find(n),o.each(function(){var e=t(this);e.children(".ui-controlgroup-label-contents").length||e.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),e._addClass(o,null,"ui-widget ui-widget-content ui-state-default"),i=i.concat(o.get()),void 0):(t.fn[s]&&(a=e["_"+s+"Options"]?e["_"+s+"Options"]("middle"):{classes:{}},e.element.find(n).each(function(){var n=t(this),o=n[s]("instance"),r=t.widget.extend({},a);if("button"!==s||!n.parent(".ui-spinner").length){o||(o=n[s]()[s]("instance")),o&&(r.classes=e._resolveClassesValues(r.classes,o)),n[s](r);var h=n[s]("widget");t.data(h[0],"ui-controlgroup-data",o?o:n[s]("instance")),i.push(h[0])}})),void 0):void 0}),this.childWidgets=t(t.unique(i)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var i=t(this),s=i.data("ui-controlgroup-data");s&&s[e]&&s[e]()})},_updateCornerClass:function(t,e){var i="ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all",s=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,i),this._addClass(t,null,s)},_buildSimpleOptions:function(t,e){var i="vertical"===this.options.direction,s={classes:{}};return s.classes[e]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[t],s},_spinnerOptions:function(t){var e=this._buildSimpleOptions(t,"ui-spinner");return e.classes["ui-spinner-up"]="",e.classes["ui-spinner-down"]="",e},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:e?"auto":!1,classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(e,i){var s={};return t.each(e,function(n){var o=i.options.classes[n]||"";o=t.trim(o.replace(g,"")),s[n]=(o+" "+e[n]).replace(/\s+/g," ")}),s},_setOption:function(t,e){return"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"===t?(this._callChildMethod(e?"disable":"enable"),void 0):(this.refresh(),void 0)},refresh:function(){var e,i=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),e=this.childWidgets,this.options.onlyVisible&&(e=e.filter(":visible")),e.length&&(t.each(["first","last"],function(t,s){var n=e[s]().data("ui-controlgroup-data");if(n&&i["_"+n.widgetName+"Options"]){var o=i["_"+n.widgetName+"Options"](1===e.length?"only":s);o.classes=i._resolveClassesValues(o.classes,n),n.element[n.widgetName](o)}else i._updateCornerClass(e[s](),s)}),this._callChildMethod("refresh"))}}),t.widget("ui.checkboxradio",[t.ui.formResetMixin,{version:"1.12.1",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var e,i,s=this,n=this._super()||{};return this._readType(),i=this.element.labels(),this.label=t(i[i.length-1]),this.label.length||t.error("No label found for checkboxradio widget"),this.originalLabel="",this.label.contents().not(this.element[0]).each(function(){s.originalLabel+=3===this.nodeType?t(this).text():this.outerHTML}),this.originalLabel&&(n.label=this.originalLabel),e=this.element[0].disabled,null!=e&&(n.disabled=e),n},_create:function(){var t=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),t&&(this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this.icon&&this._addClass(this.icon,null,"ui-state-hover")),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var e=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===e&&/radio|checkbox/.test(this.type)||t.error("Can't create checkboxradio on element.nodeName="+e+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var e,i=this.element[0].name,s="input[name='"+t.ui.escapeSelector(i)+"']";return i?(e=this.form.length?t(this.form[0].elements).filter(s):t(s).filter(function(){return 0===t(this).form().length}),e.not(this.element)):t([])},_toggleClasses:function(){var e=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",e),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",e)._toggleClass(this.icon,null,"ui-icon-blank",!e),"radio"===this.type&&this._getRadioGroup().each(function(){var e=t(this).checkboxradio("instance");e&&e._removeClass(e.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(t,e){return"label"!==t||e?(this._super(t,e),"disabled"===t?(this._toggleClass(this.label,null,"ui-state-disabled",e),this.element[0].disabled=e,void 0):(this.refresh(),void 0)):void 0},_updateIcon:function(e){var i="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=t("<span>"),this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(i+=e?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,e?"ui-icon-blank":"ui-icon-check")):i+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",i),e||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var t=this.label.contents().not(this.element[0]);this.icon&&(t=t.not(this.icon[0])),this.iconSpace&&(t=t.not(this.iconSpace[0])),t.remove(),this.label.append(this.options.label)},refresh:function(){var t=this.element[0].checked,e=this.element[0].disabled;this._updateIcon(t),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),null!==this.options.label&&this._updateLabel(),e!==this.options.disabled&&this._setOptions({disabled:e})}}]),t.ui.checkboxradio,t.widget("ui.button",{version:"1.12.1",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var t,e=this._super()||{};return this.isInput=this.element.is("input"),t=this.element[0].disabled,null!=t&&(e.disabled=t),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(e.label=this.originalLabel),e},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(e){e.keyCode===t.ui.keyCode.SPACE&&(e.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(e,i){var s="iconPosition"!==e,n=s?this.options.iconPosition:i,o="top"===n||"bottom"===n;this.icon?s&&this._removeClass(this.icon,null,this.options.icon):(this.icon=t("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),s&&this._addClass(this.icon,null,i),this._attachIcon(n),o?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(n))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(t){this.icon[/^(?:end|bottom)/.test(t)?"before":"after"](this.iconSpace)},_attachIcon:function(t){this.element[/^(?:end|bottom)/.test(t)?"append":"prepend"](this.icon)},_setOptions:function(t){var e=void 0===t.showLabel?this.options.showLabel:t.showLabel,i=void 0===t.icon?this.options.icon:t.icon;e||i||(t.showLabel=!0),this._super(t)},_setOption:function(t,e){"icon"===t&&(e?this._updateIcon(t,e):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===t&&this._updateIcon(t,e),"showLabel"===t&&(this._toggleClass("ui-button-icon-only",null,!e),this._updateTooltip()),"label"===t&&(this.isInput?this.element.val(e):(this.element.html(e),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(t,e),"disabled"===t&&(this._toggleClass(null,"ui-state-disabled",e),this.element[0].disabled=e,e&&this.element.blur())},refresh:function(){var t=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOptions({disabled:t}),this._updateTooltip()}}),t.uiBackCompat!==!1&&(t.widget("ui.button",t.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(t,e){return"text"===t?(this._super("showLabel",e),void 0):("showLabel"===t&&(this.options.text=e),"icon"===t&&(this.options.icons.primary=e),"icons"===t&&(e.primary?(this._super("icon",e.primary),this._super("iconPosition","beginning")):e.secondary&&(this._super("icon",e.secondary),this._super("iconPosition","end"))),this._superApply(arguments),void 0)}}),t.fn.button=function(e){return function(){return!this.length||this.length&&"INPUT"!==this[0].tagName||this.length&&"INPUT"===this[0].tagName&&"checkbox"!==this.attr("type")&&"radio"!==this.attr("type")?e.apply(this,arguments):(t.ui.checkboxradio||t.error("Checkboxradio widget missing"),0===arguments.length?this.checkboxradio({icon:!1}):this.checkboxradio.apply(this,arguments))}}(t.fn.button),t.fn.buttonset=function(){return t.ui.controlgroup||t.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))}),t.ui.button,t.extend(t.ui,{datepicker:{version:"1.12.1"}});var m;t.extend(s.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return a(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var s,n,o;s=e.nodeName.toLowerCase(),n="div"===s||"span"===s,e.id||(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),n),o.settings=t.extend({},i||{}),"input"===s?this._connectDatepicker(e,o):n&&this._inlineDatepicker(e,o)},_newInst:function(e,i){var s=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:s,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?n(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var s=t(e);i.append=t([]),i.trigger=t([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(i),t.data(e,"datepicker",i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var s,n,o,a=this._get(i,"appendText"),r=this._get(i,"isRTL");i.append&&i.append.remove(),a&&(i.append=t("<span class='"+this._appendClass+"'>"+a+"</span>"),e[r?"before":"after"](i.append)),e.off("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&e.on("focus",this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:o,alt:n,title:n}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:n,title:n}):n)),e[r?"before":"after"](i.trigger),i.trigger.on("click",function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,o=new Date(2009,11,20),a=this._get(t,"dateFormat");a.match(/[DM]/)&&(e=function(t){for(i=0,s=0,n=0;t.length>n;n++)t[n].length>i&&(i=t[n].length,s=n);return s},o.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var s=t(e);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),t.data(e,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,s,n,o){var r,h,l,c,u,d=this._dialogInst;return d||(this.uuid+=1,r="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+r+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),t("body").append(this._dialogInput),d=this._dialogInst=this._newInst(this._dialogInput,!1),d.settings={},t.data(this._dialogInput[0],"datepicker",d)),a(d.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(d,i):i,this._dialogInput.val(i),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(h=document.documentElement.clientWidth,l=document.documentElement.clientHeight,c=document.documentElement.scrollLeft||document.body.scrollLeft,u=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[h/2-100+c,l/2-150+u]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),d.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],"datepicker",d),this},_destroyDatepicker:function(e){var i,s=t(e),n=t.data(e,"datepicker");s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,"datepicker"),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty(),m===n&&(m=null))},_enableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;this._disabledInputs.length>e;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,"datepicker")}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,i,s){var n,o,r,h,l=this._getInst(e);return 2===arguments.length&&"string"==typeof i?"defaults"===i?t.extend({},t.datepicker._defaults):l?"all"===i?t.extend({},l.settings):this._get(l,i):null:(n=i||{},"string"==typeof i&&(n={},n[i]=s),l&&(this._curInst===l&&this._hideDatepicker(),o=this._getDateDatepicker(e,!0),r=this._getMinMaxDate(l,"min"),h=this._getMinMaxDate(l,"max"),a(l.settings,n),null!==r&&void 0!==n.dateFormat&&void 0===n.minDate&&(l.settings.minDate=this._formatDate(l,r)),null!==h&&void 0!==n.dateFormat&&void 0===n.maxDate&&(l.settings.maxDate=this._formatDate(l,h)),"disabled"in n&&(n.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(t(e),l),this._autoSize(l),this._setDate(l,o),this._updateAlternate(l),this._updateDatepicker(l)),void 0)},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,s,n,o=t.datepicker._getInst(e.target),a=!0,r=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),a=!1;break;case 13:return n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv),n[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,n[0]),i=t.datepicker._get(o,"onSelect"),i?(s=t.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[s,o])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),a=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),a=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?1:-1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),a=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?-1:1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),a=e.ctrlKey||e.metaKey;break;default:a=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):a=!1;a&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var i,s,n=t.datepicker._getInst(e.target);return t.datepicker._get(n,"constrainInput")?(i=t.datepicker._possibleChars(t.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||" ">s||!i||i.indexOf(s)>-1):void 0},_doKeyUp:function(e){var i,s=t.datepicker._getInst(e.target);if(s.input.val()!==s.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,t.datepicker._getFormatConfig(s)),i&&(t.datepicker._setDateFromField(s),t.datepicker._updateAlternate(s),t.datepicker._updateDatepicker(s))}catch(n){}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var s,n,o,r,h,l,c;s=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==s&&(t.datepicker._curInst.dpDiv.stop(!0,!0),s&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),n=t.datepicker._get(s,"beforeShow"),o=n?n.apply(e,[e,s]):{},o!==!1&&(a(s.settings,o),s.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(s),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),r=!1,t(e).parents().each(function(){return r|="fixed"===t(this).css("position"),!r}),h={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,s.dpDiv.empty(),s.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(s),h=t.datepicker._checkOffset(s,h,r),s.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":r?"fixed":"absolute",display:"none",left:h.left+"px",top:h.top+"px"}),s.inline||(l=t.datepicker._get(s,"showAnim"),c=t.datepicker._get(s,"duration"),s.dpDiv.css("z-index",i(t(e))+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[l]?s.dpDiv.show(l,t.datepicker._get(s,"showOptions"),c):s.dpDiv[l||"show"](l?c:null),t.datepicker._shouldFocusInput(s)&&s.input.trigger("focus"),t.datepicker._curInst=s))
17
vendor: 32,043 bytes, line 17
17}},_updateDatepicker:function(e){this.maxRows=4,m=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var i,s=this._getNumberOfMonths(e),n=s[1],a=17,r=e.dpDiv.find("."+this._dayOverClass+" a");r.length>0&&o.apply(r.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&e.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",a*n+"em"),e.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.trigger("focus"),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),a=e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-a:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+r?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+o>l&&l>o?Math.abs(o+r):0),i},_findPos:function(e){for(var i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,s,n,o,a=this._curInst;!a||e&&a!==t.data(e,"datepicker")||this._datepickerShowing&&(i=this._get(a,"showAnim"),s=this._get(a,"duration"),n=function(){t.datepicker._tidyDialog(a)},t.effects&&(t.effects.effect[i]||t.effects[i])?a.dpDiv.hide(i,t.datepicker._get(a,"showOptions"),s,n):a.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,o=this._get(a,"onClose"),o&&o.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==s)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var n=t(e),o=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(o,i+("M"===s?this._get(o,"showCurrentAtPos"):0),s),this._updateDatepicker(o))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),o=this._getInst(n[0]);o["selected"+("M"===s?"Month":"Year")]=o["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(n)},_selectDay:function(e,i,s,n){var o,a=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||(o=this._getInst(a[0]),o.selectedDay=o.currentDay=t("a",n).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=s,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),o=this._getInst(n[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),s=this._get(o,"onSelect"),s?s.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(e){var i,s,n,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(o).val(n))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(e,i,s){if(null==e||null==i)throw"Invalid arguments";if(i="object"==typeof i?""+i:i+"",""===i)return null;var n,o,a,r,h=0,l=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof l?l:(new Date).getFullYear()%100+parseInt(l,10),u=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,d=(s?s.dayNames:null)||this._defaults.dayNames,p=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,f=(s?s.monthNames:null)||this._defaults.monthNames,g=-1,m=-1,_=-1,v=-1,b=!1,y=function(t){var i=e.length>n+1&&e.charAt(n+1)===t;return i&&n++,i},w=function(t){var e=y(t),s="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,n="y"===t?s:1,o=RegExp("^\\d{"+n+","+s+"}"),a=i.substring(h).match(o);if(!a)throw"Missing number at position "+h;return h+=a[0].length,parseInt(a[0],10)},k=function(e,s,n){var o=-1,a=t.map(y(e)?n:s,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(a,function(t,e){var s=e[1];return i.substr(h,s.length).toLowerCase()===s.toLowerCase()?(o=e[0],h+=s.length,!1):void 0}),-1!==o)return o+1;throw"Unknown name at position "+h},x=function(){if(i.charAt(h)!==e.charAt(n))throw"Unexpected literal at position "+h;h++};for(n=0;e.length>n;n++)if(b)"'"!==e.charAt(n)||y("'")?x():b=!1;else switch(e.charAt(n)){case"d":_=w("d");break;case"D":k("D",u,d);break;case"o":v=w("o");break;case"m":m=w("m");break;case"M":m=k("M",p,f);break;case"y":g=w("y");break;case"@":r=new Date(w("@")),g=r.getFullYear(),m=r.getMonth()+1,_=r.getDate();break;case"!":r=new Date((w("!")-this._ticksTo1970)/1e4),g=r.getFullYear(),m=r.getMonth()+1,_=r.getDate();break;case"'":y("'")?x():b=!0;break;default:x()}if(i.length>h&&(a=i.substr(h),!/^\s+/.test(a)))throw"Extra/unparsed characters found in date: "+a;if(-1===g?g=(new Date).getFullYear():100>g&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c>=g?0:-100)),v>-1)for(m=1,_=v;;){if(o=this._getDaysInMonth(g,m-1),o>=_)break;m++,_-=o}if(r=this._daylightSavingAdjust(new Date(g,m-1,_)),r.getFullYear()!==g||r.getMonth()+1!==m||r.getDate()!==_)throw"Invalid date";return r},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(t,e,i){if(!e)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,a=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,h=function(e){var i=t.length>s+1&&t.charAt(s+1)===e;return i&&s++,i},l=function(t,e,i){var s=""+e;if(h(t))for(;i>s.length;)s="0"+s;return s},c=function(t,e,i,s){return h(t)?s[e]:i[e]},u="",d=!1;if(e)for(s=0;t.length>s;s++)if(d)"'"!==t.charAt(s)||h("'")?u+=t.charAt(s):d=!1;else switch(t.charAt(s)){case"d":u+=l("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),n,o);break;case"o":u+=l("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=l("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),a,r);break;case"y":u+=h("y")?e.getFullYear():(10>e.getFullYear()%100?"0":"")+e.getFullYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":h("'")?u+="'":d=!0;break;default:u+=t.charAt(s)}return u},_possibleChars:function(t){var e,i="",s=!1,n=function(i){var s=t.length>e+1&&t.charAt(e+1)===i;return s&&e++,s};for(e=0;t.length>e;e++)if(s)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):s=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,e){return void 0!==t.settings[e]?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),o=n,a=this._getFormatConfig(t);try{o=this.parseDate(i,s,a)||n}catch(r){s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?o.getMonth():0,t.currentYear=s?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,s){var n=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},o=function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=n.getFullYear(),a=n.getMonth(),r=n.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=h.exec(i);l;){switch(l[2]||"d"){case"d":case"D":r+=parseInt(l[1],10);break;case"w":case"W":r+=7*parseInt(l[1],10);break;case"m":case"M":a+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a));break;case"y":case"Y":o+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a))}l=h.exec(i)}return new Date(o,a,r)},a=null==i||""===i?s:"string"==typeof i?o(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return a=a&&"Invalid Date"==""+a?s:a,a&&(a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)),this._daylightSavingAdjust(a)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,a=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=a.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=a.getMonth(),t.drawYear=t.selectedYear=t.currentYear=a.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(s,-i,"M")},next:function(){t.datepicker._adjustDate(s,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(s)},selectDay:function(){return t.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(s,this,"Y"),!1}};t(this).on(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,o,a,r,h,l,c,u,d,p,f,g,m,_,v,b,y,w,k,x,C,D,I,T,P,M,S,H,z,O,A,N,W,E,F,L,R=new Date,B=this._daylightSavingAdjust(new Date(R.getFullYear(),R.getMonth(),R.getDate())),Y=this._get(t,"isRTL"),j=this._get(t,"showButtonPanel"),q=this._get(t,"hideIfNoPrevNext"),K=this._get(t,"navigationAsDateFormat"),U=this._getNumberOfMonths(t),V=this._get(t,"showCurrentAtPos"),$=this._get(t,"stepMonths"),X=1!==U[0]||1!==U[1],G=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),Q=this._getMinMaxDate(t,"min"),J=this._getMinMaxDate(t,"max"),Z=t.drawMonth-V,te=t.drawYear;if(0>Z&&(Z+=12,te--),J)for(e=this._daylightSavingAdjust(new Date(J.getFullYear(),J.getMonth()-U[0]*U[1]+1,J.getDate())),e=Q&&Q>e?Q:e;this._daylightSavingAdjust(new Date(te,Z,1))>e;)Z--,0>Z&&(Z=11,te--);for(t.drawMonth=Z,t.drawYear=te,i=this._get(t,"prevText"),i=K?this.formatDate(i,this._daylightSavingAdjust(new Date(te,Z-$,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,te,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>":q?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>",n=this._get(t,"nextText"),n=K?this.formatDate(n,this._daylightSavingAdjust(new Date(te,Z+$,1)),this._getFormatConfig(t)):n,o=this._canAdjustMonth(t,1,te,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>":q?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>",a=this._get(t,"currentText"),r=this._get(t,"gotoCurrent")&&t.currentDay?G:B,a=K?this.formatDate(a,r,this._getFormatConfig(t)):a,h=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",l=j?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Y?h:"")+(this._isInRange(t,r)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+a+"</button>":"")+(Y?"":h)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),_=this._get(t,"showOtherMonths"),v=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),y="",k=0;U[0]>k;k++){for(x="",this.maxRows=4,C=0;U[1]>C;C++){if(D=this._daylightSavingAdjust(new Date(te,Z,t.selectedDay)),I=" ui-corner-all",T="",X){if(T+="<div class='ui-datepicker-group",U[1]>1)switch(C){case 0:T+=" ui-datepicker-group-first",I=" ui-corner-"+(Y?"right":"left");break;case U[1]-1:T+=" ui-datepicker-group-last",I=" ui-corner-"+(Y?"left":"right");break;default:T+=" ui-datepicker-group-middle",I=""}T+="'>"}for(T+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+I+"'>"+(/all|left/.test(I)&&0===k?Y?o:s:"")+(/all|right/.test(I)&&0===k?Y?s:o:"")+this._generateMonthYearHeader(t,Z,te,Q,J,k>0||C>0,f,g)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",P=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;7>w;w++)M=(w+c)%7,P+="<th scope='col'"+((w+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+d[M]+"'>"+p[M]+"</span></th>";for(T+=P+"</tr></thead><tbody>",S=this._getDaysInMonth(te,Z),te===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,S)),H=(this._getFirstDayOfMonth(te,Z)-c+7)%7,z=Math.ceil((H+S)/7),O=X?this.maxRows>z?this.maxRows:z:z,this.maxRows=O,A=this._daylightSavingAdjust(new Date(te,Z,1-H)),N=0;O>N;N++){for(T+="<tr>",W=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(A)+"</td>":"",w=0;7>w;w++)E=m?m.apply(t.input?t.input[0]:null,[A]):[!0,""],F=A.getMonth()!==Z,L=F&&!v||!E[0]||Q&&Q>A||J&&A>J,W+="<td class='"+((w+c+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(A.getTime()===D.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===A.getTime()&&b.getTime()===D.getTime()?" "+this._dayOverClass:"")+(L?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!_?"":" "+E[1]+(A.getTime()===G.getTime()?" "+this._currentClass:"")+(A.getTime()===B.getTime()?" ui-datepicker-today":""))+"'"+(F&&!_||!E[2]?"":" title='"+E[2].replace(/'/g,"'")+"'")+(L?"":" data-handler='selectDay' data-event='click' data-month='"+A.getMonth()+"' data-year='"+A.getFullYear()+"'")+">"+(F&&!_?" ":L?"<span class='ui-state-default'>"+A.getDate()+"</span>":"<a class='ui-state-default"+(A.getTime()===B.getTime()?" ui-state-highlight":"")+(A.getTime()===G.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+"' href='#'>"+A.getDate()+"</a>")+"</td>",A.setDate(A.getDate()+1),A=this._daylightSavingAdjust(A);T+=W+"</tr>"}Z++,Z>11&&(Z=0,te++),T+="</tbody></table>"+(X?"</div>"+(U[0]>0&&C===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),x+=T}y+=x}return y+=l,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var h,l,c,u,d,p,f,g,m=this._get(t,"changeMonth"),_=this._get(t,"changeYear"),v=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(o||!m)y+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!h||c>=s.getMonth())&&(!l||n.getMonth()>=c)&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+r[c]+"</option>");y+="</select>"}if(v||(b+=y+(!o&&m&&_?"":" ")),!t.yearshtml)if(t.yearshtml="",o||!_)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e},f=p(u[0]),g=Math.max(f,p(u[1]||"")),f=s?Math.max(f,s.getFullYear()):f,g=n?Math.min(g,n.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";g>=f;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),v&&(b+=(!o&&m&&_?"":" ")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.selectedYear+("Y"===i?e:0),n=t.selectedMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,o)));t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&i>e?i:e;return s&&n>s?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,s+(0>e?e:n[0]*n[1]),1));return 0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),a=null,r=null,h=this._get(t,"yearRange");return h&&(i=h.split(":"),s=(new Date).getFullYear(),a=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(a+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||e.getTime()>=n.getTime())&&(!o||e.getTime()<=o.getTime())&&(!a||e.getFullYear()>=a)&&(!r||r>=e.getFullYear())},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).on("mousedown",t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new s,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.12.1",t.datepicker,t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var _=!1;t(document).on("mouseup",function(){_=!1}),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!_){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,s=1===e.which,n="string"==typeof this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return s&&!n&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),_=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,_=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;o.length>n;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},t.ui.safeBlur=function(e){e&&"body"!==e.nodeName.toLowerCase()&&t(e).trigger("blur")},t.widget("ui.draggable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?(this.destroyOnClear=!0,void 0):(this._removeHandleClassName(),this._mouseDestroy(),void 0)},_mouseCapture:function(e){var i=this.options;return this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(this._blurActiveElement(e),this._blockFrames(i.iframeFix===!0?"iframe":i.iframeFix),!0):!1)},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map(function(){var e=t(this);return t("<div>").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var i=t.ui.safeActiveElement(this.document[0]),s=t(e.target);s.closest(i).length||t.ui.safeBlur(i)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===t(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(e,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",e,s)===!1)return this._mouseUp(new t.Event("mouseup",e)),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.trigger("focus"),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new t.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper),n=s?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s&&n[0]===this.element[0]&&this._setPositionRelative(),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}
18
vendor: 32,039 bytes, line 18
18},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options,o=this.document[0];return this.relativeContainer=null,n.containment?"window"===n.containment?(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):"document"===n.containment?(this.containment=[0,0,t(o).width()-this.helperProportions.width-this.margins.left,(t(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):n.containment.constructor===Array?(this.containment=n.containment,void 0):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=t(n.containment),s=i[0],s&&(e=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i),void 0):(this.containment=null,void 0)},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,s,n,o,a=this.options,r=this._isRootNode(this.scrollParent[0]),h=t.pageX,l=t.pageY;return r&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),a.grid&&(n=a.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-a.grid[1]:n+a.grid[1]:n,o=a.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,h=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-a.grid[0]:o+a.grid[0]:o),"y"===a.axis&&(h=this.originalPageX),"x"===a.axis&&(l=this.originalPageY)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i,s){var n=t.extend({},i,{item:s.element});s.sortables=[],t(s.options.connectToSortable).each(function(){var i=t(this).sortable("instance");i&&!i.options.disabled&&(s.sortables.push(i),i.refreshPositions(),i._trigger("activate",e,n))})},stop:function(e,i,s){var n=t.extend({},i,{item:s.element});s.cancelHelperRemoval=!1,t.each(s.sortables,function(){var t=this;t.isOver?(t.isOver=0,s.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,n))})},drag:function(e,i,s){t.each(s.sortables,function(){var n=!1,o=this;o.positionAbs=s.positionAbs,o.helperProportions=s.helperProportions,o.offset.click=s.offset.click,o._intersectsWith(o.containerCache)&&(n=!0,t.each(s.sortables,function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==o&&this._intersectsWith(this.containerCache)&&t.contains(o.element[0],this.element[0])&&(n=!1),n})),n?(o.isOver||(o.isOver=1,s._parent=i.helper.parent(),o.currentItem=i.helper.appendTo(o.element).data("ui-sortable-item",!0),o.options._helper=o.options.helper,o.options.helper=function(){return i.helper[0]},e.target=o.currentItem[0],o._mouseCapture(e,!0),o._mouseStart(e,!0,!0),o.offset.click.top=s.offset.click.top,o.offset.click.left=s.offset.click.left,o.offset.parent.left-=s.offset.parent.left-o.offset.parent.left,o.offset.parent.top-=s.offset.parent.top-o.offset.parent.top,s._trigger("toSortable",e),s.dropped=o.element,t.each(s.sortables,function(){this.refreshPositions()}),s.currentItem=s.element,o.fromOutside=s),o.currentItem&&(o._mouseDrag(e),i.position=o.position)):o.isOver&&(o.isOver=0,o.cancelHelperRemoval=!0,o.options._revert=o.options.revert,o.options.revert=!1,o._trigger("out",e,o._uiHash(o)),o._mouseStop(e,!0),o.options.revert=o.options._revert,o.options.helper=o.options._helper,o.placeholder&&o.placeholder.remove(),i.helper.appendTo(s._parent),s._refreshOffsets(e),i.position=s._generatePosition(e,!0),s._trigger("fromSortable",e),s.dropped=!1,t.each(s.sortables,function(){this.refreshPositions()}))})}}),t.ui.plugin.add("draggable","cursor",{start:function(e,i,s){var n=t("body"),o=s.options;n.css("cursor")&&(o._cursor=n.css("cursor")),n.css("cursor",o.cursor)},stop:function(e,i,s){var n=s.options;n._cursor&&t("body").css("cursor",n._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("opacity")&&(o._opacity=n.css("opacity")),n.css("opacity",o.opacity)},stop:function(e,i,s){var n=s.options;n._opacity&&t(i.helper).css("opacity",n._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(e,i,s){var n=s.options,o=!1,a=s.scrollParentNotHidden[0],r=s.document[0];a!==r&&"HTML"!==a.tagName?(n.axis&&"x"===n.axis||(s.overflowOffset.top+a.offsetHeight-e.pageY<n.scrollSensitivity?a.scrollTop=o=a.scrollTop+n.scrollSpeed:e.pageY-s.overflowOffset.top<n.scrollSensitivity&&(a.scrollTop=o=a.scrollTop-n.scrollSpeed)),n.axis&&"y"===n.axis||(s.overflowOffset.left+a.offsetWidth-e.pageX<n.scrollSensitivity?a.scrollLeft=o=a.scrollLeft+n.scrollSpeed:e.pageX-s.overflowOffset.left<n.scrollSensitivity&&(a.scrollLeft=o=a.scrollLeft-n.scrollSpeed))):(n.axis&&"x"===n.axis||(e.pageY-t(r).scrollTop()<n.scrollSensitivity?o=t(r).scrollTop(t(r).scrollTop()-n.scrollSpeed):t(window).height()-(e.pageY-t(r).scrollTop())<n.scrollSensitivity&&(o=t(r).scrollTop(t(r).scrollTop()+n.scrollSpeed))),n.axis&&"y"===n.axis||(e.pageX-t(r).scrollLeft()<n.scrollSensitivity?o=t(r).scrollLeft(t(r).scrollLeft()-n.scrollSpeed):t(window).width()-(e.pageX-t(r).scrollLeft())<n.scrollSensitivity&&(o=t(r).scrollLeft(t(r).scrollLeft()+n.scrollSpeed)))),o!==!1&&t.ui.ddmanager&&!n.dropBehaviour&&t.ui.ddmanager.prepareOffsets(s,e)}}),t.ui.plugin.add("draggable","snap",{start:function(e,i,s){var n=s.options;s.snapElements=[],t(n.snap.constructor!==String?n.snap.items||":data(ui-draggable)":n.snap).each(function(){var e=t(this),i=e.offset();this!==s.element[0]&&s.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:i.top,left:i.left})})},drag:function(e,i,s){var n,o,a,r,h,l,c,u,d,p,f=s.options,g=f.snapTolerance,m=i.offset.left,_=m+s.helperProportions.width,v=i.offset.top,b=v+s.helperProportions.height;for(d=s.snapElements.length-1;d>=0;d--)h=s.snapElements[d].left-s.margins.left,l=h+s.snapElements[d].width,c=s.snapElements[d].top-s.margins.top,u=c+s.snapElements[d].height,h-g>_||m>l+g||c-g>b||v>u+g||!t.contains(s.snapElements[d].item.ownerDocument,s.snapElements[d].item)?(s.snapElements[d].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=!1):("inner"!==f.snapMode&&(n=g>=Math.abs(c-b),o=g>=Math.abs(u-v),a=g>=Math.abs(h-_),r=g>=Math.abs(l-m),n&&(i.position.top=s._convertPositionTo("relative",{top:c-s.helperProportions.height,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:u,left:0}).top),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h-s.helperProportions.width}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l}).left)),p=n||o||a||r,"outer"!==f.snapMode&&(n=g>=Math.abs(c-v),o=g>=Math.abs(u-b),a=g>=Math.abs(h-m),r=g>=Math.abs(l-_),n&&(i.position.top=s._convertPositionTo("relative",{top:c,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:u-s.helperProportions.height,left:0}).top),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left)),!s.snapElements[d].snapping&&(n||o||a||r||p)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=n||o||a||r||p)}}),t.ui.plugin.add("draggable","stack",{start:function(e,i,s){var n,o=s.options,a=t.makeArray(t(o.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});a.length&&(n=parseInt(t(a[0]).css("zIndex"),10)||0,t(a).each(function(e){t(this).css("zIndex",n+e)}),this.css("zIndex",n+a.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("zIndex")&&(o._zIndex=n.css("zIndex")),n.css("zIndex",o.zIndex)},stop:function(e,i,s){var n=s.options;n._zIndex&&t(i.helper).css("zIndex",n._zIndex)}}),t.ui.draggable,t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)},_create:function(){var e,i=this.options,s=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",function(){i.disabled||(s._removeClass("ui-resizable-autohide"),s._handles.show())}).on("mouseleave",function(){i.disabled||s.resizing||(s._addClass("ui-resizable-autohide"),s._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;default:}},_setupHandles:function(){var e,i,s,n,o,a=this.options,r=this;if(this.handles=a.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),s=this.handles.split(","),this.handles={},i=0;s.length>i;i++)e=t.trim(s[i]),n="ui-resizable-"+e,o=t("<div>"),this._addClass(o,"ui-resizable-handle "+n),o.css({zIndex:a.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(o);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){r.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=o&&o[1]?o[1]:"se")}),a.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(e){var i,s,n,o=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),o.containment&&(i+=t(o.containment).scrollLeft()||0,s+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===n?this.axis+"-resize":n),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s,n=this.originalMousePosition,o=this.axis,a=e.pageX-n.left||0,r=e.pageY-n.top||0,h=this._change[o];return this._updatePrevProperties(),h?(i=h.apply(this,[e,a,r]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,h=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(a,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,n,o,a=this.options;o={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,s=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),s>o.minHeight&&(o.minHeight=s),o.maxWidth>i&&(o.maxWidth=i),o.maxHeight>n&&(o.maxHeight=n)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,n=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,h=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=r-e.minWidth),s&&l&&(t.left=r-e.maxWidth),a&&c&&(t.top=h-e.minHeight),n&&c&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];4>e;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;this._proportionallyResizeElements.length>e;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-a},l=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,s,n,o,a,r,h=t(this).resizable("instance"),l=h.options,c=h.element,u=l.containment,d=u instanceof t?u.get(0):/parent/.test(u)?c.parent().get(0):u;d&&(h.containerElement=t(d),/document/.test(u)||u===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){i[t]=h._num(e.css("padding"+s))}),h.containerOffset=e.offset(),h.containerPosition=e.position(),h.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=h.containerOffset,n=h.containerSize.height,o=h.containerSize.width,a=h._hasScroll(d,"left")?d.scrollWidth:o,r=h._hasScroll(d)?d.scrollHeight:n,h.parentData={element:d,left:s.left,top:s.top,width:a,height:r}))},resize:function(e){var i,s,n,o,a=t(this).resizable("instance"),r=a.options,h=a.containerOffset,l=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio,p=!1),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio,p=!1),a.position.top=a._helper?h.top:0),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),i=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-u.left:a.offset.left-h.left)),s=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-u.top:a.offset.top-h.top)),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio,p=!1)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio,p=!1)),p||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),h=a.outerWidth()-e.sizeDiff.width,l=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance"),i=e.options;t(i.alsoResize).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})})},resize:function(e,i){var s=t(this).resizable("instance"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0};t(n.alsoResize).each(function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),n={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&i>=0&&(n[e]=i||null)}),e.css(n)})},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),t.uiBackCompat!==!1&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,n=i.size,o=i.originalSize,a=i.originalPosition,r=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,c=h[1]||1,u=Math.round((n.width-o.width)/l)*l,d=Math.round((n.height-o.height)/c)*c,p=o.width+u,f=o.height+d,g=s.maxWidth&&p>s.maxWidth,m=s.maxHeight&&f>s.maxHeight,_=s.minWidth&&s.minWidth>p,v=s.minHeight&&s.minHeight>f;s.grid=h,_&&(p+=l),v&&(f+=c),g&&(p-=l),m&&(f-=c),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=a.top-d):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=a.left-u):((0>=f-c||0>=p-l)&&(e=i._getPaddingPlusBorderDimensions(this)),f-c>0?(i.size.height=f,i.position.top=a.top-d):(f=c-e.height,i.size.height=f,i.position.top=a.top+o.height-f),p-l>0?(i.size.width=p,i.position.left=a.left-u):(p=l-e.width,i.size.width=p,i.position.left=a.left+o.width-p))}}),t.ui.resizable,t.widget("ui.dialog",{version:"1.12.1",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;0>i&&t(this).css("top",e.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),t=e.parent.children().eq(e.index),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog
19
vendor: 32,619 bytes, line 19
19},disable:t.noop,enable:t.noop,close:function(e){var i=this;this._isOpen&&this._trigger("beforeClose",e)!==!1&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||t.ui.safeBlur(t.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,i){var s=!1,n=this.uiDialog.siblings(".ui-front:visible").map(function(){return+t(this).css("z-index")}).get(),o=Math.max.apply(null,n);return o>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",o+1),s=!0),s&&!i&&this._trigger("focus",e),s},open:function(){var e=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),void 0):(this._isOpen=!0,this.opener=t(t.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"),void 0)},_focusTabbable:function(){var t=this._focusedElement;t||(t=this.element.find("[autofocus]")),t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).trigger("focus")},_keepFocus:function(e){function i(){var e=t.ui.safeActiveElement(this.document[0]),i=this.uiDialog[0]===e||t.contains(this.uiDialog[0],e);i||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),this.close(e),void 0;if(e.keyCode===t.ui.keyCode.TAB&&!e.isDefaultPrevented()){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");e.target!==n[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==s[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(this._delay(function(){n.trigger("focus")}),e.preventDefault()):(this._delay(function(){s.trigger("focus")}),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=t("<button type='button'></button>").button({label:t("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(e,"ui-dialog-title"),this._title(e),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title?t.text(this.options.title):t.html(" ")},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?(this._removeClass(this.uiDialog,"ui-dialog-buttons"),void 0):(t.each(i,function(i,s){var n,o;s=t.isFunction(s)?{click:s,text:i}:s,s=t.extend({type:"button"},s),n=s.click,o={icon:s.icon,iconPosition:s.iconPosition,showLabel:s.showLabel,icons:s.icons,text:s.text},delete s.click,delete s.icon,delete s.iconPosition,delete s.showLabel,delete s.icons,"boolean"==typeof s.text&&delete s.text,t("<button></button>",s).button(o).appendTo(e.uiButtonSet).on("click",function(){n.apply(e.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),void 0)},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){i._addClass(t(this),"ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,e(n))},drag:function(t,s){i._trigger("drag",t,e(s))},stop:function(n,o){var a=o.offset.left-i.document.scrollLeft(),r=o.offset.top-i.document.scrollTop();s.position={my:"left top",at:"left"+(a>=0?"+":"")+a+" "+"top"+(r>=0?"+":"")+r,of:i.window},i._removeClass(t(this),"ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,e(o))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var i=this,s=this.options,n=s.resizable,o=this.uiDialog.css("position"),a="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:a,start:function(s,n){i._addClass(t(this),"ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,e(n))},resize:function(t,s){i._trigger("resize",t,e(s))},stop:function(n,o){var a=i.uiDialog.offset(),r=a.left-i.document.scrollLeft(),h=a.top-i.document.scrollTop();s.height=i.uiDialog.height(),s.width=i.uiDialog.width(),s.position={my:"left top",at:"left"+(r>=0?"+":"")+r+" "+"top"+(h>=0?"+":"")+h,of:i.window},i._removeClass(t(this),"ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,e(o))}}).css("position",o)},_trackFocus:function(){this._on(this.widget(),{focusin:function(e){this._makeFocusTarget(),this._focusedElement=t(e.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var e=this._trackingInstances(),i=t.inArray(this,e);-1!==i&&e.splice(i,1)},_trackingInstances:function(){var t=this.document.data("ui-dialog-instances");return t||(t=[],this.document.data("ui-dialog-instances",t)),t},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(e){var i=this,s=!1,n={};t.each(e,function(t,e){i._setOption(t,e),t in i.sizeRelatedOptions&&(s=!0),t in i.resizableRelatedOptions&&(n[t]=e)}),s&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",n)},_setOption:function(e,i){var s,n,o=this.uiDialog;"disabled"!==e&&(this._super(e,i),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:t("<a>").text(""+this.options.closeText).html()}),"draggable"===e&&(s=o.is(":data(ui-draggable)"),s&&!i&&o.draggable("destroy"),!s&&i&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&(n=o.is(":data(ui-resizable)"),n&&!i&&o.resizable("destroy"),n&&"string"==typeof i&&o.resizable("option","handles",i),n||i===!1||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return t(e.target).closest(".ui-dialog").length?!0:!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=!0;this._delay(function(){e=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(t){e||this._allowInteraction(t)||(t.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=t("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var t=this.document.data("ui-dialog-overlays")-1;t?this.document.data("ui-dialog-overlays",t):(this._off(this.document,"focusin"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null}}}),t.uiBackCompat!==!1&&t.widget("ui.dialog",t.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(t,e){"dialogClass"===t&&this.uiDialog.removeClass(this.options.dialogClass).addClass(e),this._superApply(arguments)}}),t.ui.dialog,t.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(s)?s:function(t){return t.is(s)},this.proportions=function(){return arguments.length?(e=arguments[0],void 0):e?e:e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},this._addToManager(i.scope),i.addClasses&&this._addClass("ui-droppable")},_addToManager:function(e){t.ui.ddmanager.droppables[e]=t.ui.ddmanager.droppables[e]||[],t.ui.ddmanager.droppables[e].push(this)},_splice:function(t){for(var e=0;t.length>e;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var e=t.ui.ddmanager.droppables[this.options.scope];this._splice(e)},_setOption:function(e,i){if("accept"===e)this.accept=t.isFunction(i)?i:function(t){return t.is(i)};else if("scope"===e){var s=t.ui.ddmanager.droppables[this.options.scope];this._splice(s),this._addToManager(i)}this._super(e,i)},_activate:function(e){var i=t.ui.ddmanager.current;this._addActiveClass(),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this._removeActiveClass(),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._addHoverClass(),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeHoverClass(),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var i=t(this).droppable("instance");return i.options.greedy&&!i.options.disabled&&i.options.scope===s.options.scope&&i.accept.call(i.element[0],s.currentItem||s.element)&&v(s,t.extend(i,{offset:i.element.offset()}),i.options.tolerance,e)?(n=!0,!1):void 0}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(s)),this.element):!1):!1},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}});var v=t.ui.intersect=function(){function t(t,e,i){return t>=e&&e+i>t}return function(e,i,s,n){if(!i.offset)return!1;var o=(e.positionAbs||e.position.absolute).left+e.margins.left,a=(e.positionAbs||e.position.absolute).top+e.margins.top,r=o+e.helperProportions.width,h=a+e.helperProportions.height,l=i.offset.left,c=i.offset.top,u=l+i.proportions().width,d=c+i.proportions().height;switch(s){case"fit":return o>=l&&u>=r&&a>=c&&d>=h;case"intersect":return o+e.helperProportions.width/2>l&&u>r-e.helperProportions.width/2&&a+e.helperProportions.height/2>c&&d>h-e.helperProportions.height/2;case"pointer":return t(n.pageY,c,i.proportions().height)&&t(n.pageX,l,i.proportions().width);case"touch":return(a>=c&&d>=a||h>=c&&d>=h||c>a&&h>d)&&(o>=l&&u>=o||r>=l&&u>=r||l>o&&r>u);default:return!1}}}();t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var s,n,o=t.ui.ddmanager.droppables[e.options.scope]||[],a=i?i.type:null,r=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(s=0;o.length>s;s++)if(!(o[s].options.disabled||e&&!o[s].accept.call(o[s].element[0],e.currentItem||e.element))){for(n=0;r.length>n;n++)if(r[n]===o[s].element[0]){o[s].proportions().height=0;continue t}o[s].visible="none"!==o[s].element.css("display"),o[s].visible&&("mousedown"===a&&o[s]._activate.call(o[s],i),o[s].offset=o[s].element.offset(),o[s].proportions({width:o[s].element[0].offsetWidth,height:o[s].element[0].offsetHeight}))}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&v(e,this,this.options.tolerance,i)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(e,i){e.element.parentsUntil("body").on("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,o,a=v(e,this,this.options.tolerance,i),r=!a&&this.isover?"isout":a&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return t(this).droppable("instance").options.scope===n}),o.length&&(s=t(o[0]).droppable("instance"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").off("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}},t.uiBackCompat!==!1&&t.widget("ui.droppable",t.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}}),t.ui.droppable,t.widget("ui.progressbar",{version:"1.12.1",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=t("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(t){return void 0===t?this.options.value:(this.options.value=this._constrainedValue(t),this._refreshValue(),void 0)},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).width(i.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,e===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}}),t.widget("ui.selectable",t.ui.mouse,{version:"1.12.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e.elementPos=t(e.element[0]).offset(),e.selectees=t(e.options.filter,e.element[0]),e._addClass(e.selectees,"ui-selectee"),e.selectees.each(function(){var i=t(this),s=i.offset(),n={left:s.left-e.elementPos.left,top:s.top-e.elementPos.top};t.data(this,"selectable-item",{element:this,$element:i,left:n.left,top:n.top,right:n.left+i.outerWidth(),bottom:n.top+i.outerHeight(),startselected:!1,selected:i.hasClass("ui-selected"),selecting:i.hasClass("ui-selecting"),unselecting:i.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=t("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(e){var i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.elementPos=t(this.element[0]).offset(),this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(i._removeClass(s.$element,"ui-selected"),s.selected=!1,i._addClass(s.$element,"ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))}),t(e.target).parents().addBack().each(function(){var s,n=t.data(this,"selectable-item");return n?(s=!e.metaKey&&!e.ctrlKey||!n.$element.hasClass("ui-selected"),i._removeClass(n.$element,s?"ui-unselecting":"ui-selected")._addClass(n.$element,s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",e,{selecting:n.element}):i._trigger("unselecting",e,{unselecting:n.element}),!1):void 0}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,o=this.opos[0],a=this.opos[1],r=e.pageX,h=e.pageY;return o>r&&(i=r,r=o,o=i),a>h&&(i=h,h=a,a=i),this.helper.css({left:o,top:a,width:r-o,height:h-a}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),l=!1,c={};i&&i.element!==s.element[0]&&(c.left=i.left+s.elementPos.left,c.right=i.right+s.elementPos.left,c.top=i.top+s.elementPos.top,c.bottom=i.bottom+s.elementPos.top,"touch"===n.tolerance?l=!(c.left>r||o>c.right||c.top>h||a>c.bottom):"fit"===n.tolerance&&(l=c.left>o&&r>c.right&&c.top>a&&h>c.bottom),l?(i.selected&&(s._removeClass(i.$element,"ui-selected"),i.selected=!1),i.unselecting&&(s._removeClass(i.$element,"ui-unselecting"),i.unselecting=!1),i.selecting||(s._addClass(i.$element,"ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(s._removeClass(i.$element,"ui-selecting"),i.selecting=!1,s._addClass(i.$element,"ui-selected"),i.selected=!0):(s._removeClass(i.$element,"ui-selecting"),i.selecting=!1,i.startselected&&(s._addClass(i.$element,"ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(s._removeClass(i.$element,"ui-selected"),i.selected=!1,s._addClass(i.$element,"ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");i._removeClass(s.$element,"ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})}),t(".ui-selecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");i._removeClass(s.$element,"ui-selecting")._addClass(s.$element,"ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})}),this._trigger("stop",e),this.helper.remove(),!1}}),t.widget("ui.selectmenu",[t.ui.formResetMixin,{version:"1.12.1",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var e=this.element.uniqueId().attr("id");this.ids={element:e,button:e+"-button",menu:e+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=t()},_drawButton:function(){var e,i=this,s=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(t){this.button.focus(),t.preventDefault()}}),this.element.hide(),this.button=t("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),e=t("<span>").appendTo(this.button),this._addClass(e,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(s).appendTo(this.button),this.options.width!==!1&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){i._rendered||i._refreshMenu()})},_drawMenu:function(){var e=this;this.menu=t("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=t("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(t,i){t.preventDefault(),e._setSelection(),e._select(i.item.data("ui-selectmenu-item"),t)},focus:function(t,i){var s=i.item.data("ui-selectmenu-item");null!=e.focusIndex&&s.index!==e.focusIndex&&(e._trigger("focus",t,{item:s}),e.isOpen||e._select(s,t)),e.focusIndex=s.index,e.button.attr("aria-activedescendant",e.menuItems.eq(s.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var t,e=this.element.find("option");this.menu.empty(),this._parseOptions(e),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,e.length&&(t=this._getSelectedItem(),this.menuInstance.focus(null,t),this._setAria(t.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(t){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",t)))},_position:function(){this.menuWrap.position(t.extend({of:this.button},this.options.position))},close:function(t){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",t))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(e){var i=t("<span>");return this._setText(i,e.label),this._addClass(i,"ui-selectmenu-text"),i},_renderMenu:function(e,i){var s=this,n="";t.each(i,function(i,o){var a;o.optgroup!==n&&(a=t("<li>",{text:o.optgroup}),s._addClass(a,"ui-selectmenu-optgroup","ui-menu-divider"+(o.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),a.appendTo(e),n=o.optgroup),s._renderItemData(e,o)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(e,i){var s=t("<li>"),n=t("<div>",{title:i.element.attr("title")});return i.disabled&&this._addClass(s,null,"ui-state-disabled"),this._setText(n,i.label),s.append(n).appendTo(e)},_setText:function(t,e){e?t.text(e):t.html(" ")},_move:function(t,e){var i,s,n=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex).parent("li"):(i=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),n+=":not(.ui-state-disabled)"),s="first"===t||"last"===t?i["first"===t?"prevAll":"nextAll"](n).eq(-1):i[t+"All"](n).eq(0),s.length&&this.menuInstance.focus(e,s)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(t){this[this.isOpen?"close":"open"](t)},_setSelection:function(){var t;this.range&&(window.getSelection?(t=window.getSelection(),t.removeAllRanges(),t.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(e){this.isOpen&&(t(e.target).closest(".ui-selectmenu-menu, #"+t.ui.escapeSelector(this.ids.button)).length||this.close(e))}},_buttonEvents:{mousedown:function(){var t;window.getSelection?(t=window.getSelection(),t.rangeCount&&(this.range=t.getRangeAt(0))):this.range=document.selection.createRange()},click:function(t){this._setSelection(),this._toggle(t)},keydown:function(e){var i=!0;switch(e.keyCode){case t.ui.keyCode.TAB:case t.ui.keyCode.ESCAPE:this.close(e),i=!1;break;case t.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(e);break;case t.ui.keyCode.UP:e.altKey?this._toggle(e):this._move("prev",e);break;case t.ui.keyCode.DOWN:e.altKey?this._toggle(e):this._move("next",e);break;case t.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(e):this._toggle(e);break;case t.ui.keyCode.LEFT:this._move("prev",e);break;case t.ui.keyCode.RIGHT:this._move("next",e);break;case t.ui.keyCode.HOME:case t.ui.keyCode.PAGE_UP:this._move("first",e);break;case t.ui.keyCode.END:case t.ui.keyCode.PAGE_DOWN:this._move("last",e);break;default:this.menu.trigger(e),i=!1}i&&e.preventDefault()}},_selectFocusedItem:function(t){var e=this.menuItems.eq(this.focusIndex).parent("li");e.hasClass("ui-state-disabled")||this._select(e.data("ui-selectmenu-item"),t)},_select:function(t,e){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=t.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(t)),this._setAria(t),this._trigger("select",e,{item:t}),t.index!==i&&this._trigger("change",e,{item:t}),this.close(e)},_setAria:function(t){var e=this.menuItems.eq(t.index).attr("id");this.button.attr({"aria-labelledby":e,"aria-activedescendant":e}),this.menu.attr("aria-activedescendant",e)},_setOption:function(t,e){if("icons"===t){var i=this.button.find("span.ui-icon");this._removeClass(i,null,this.options.icons.button)._addClass(i,null,e.button)}this._super(t,e),"appendTo"===t&&this.menuWrap.appendTo(this._appendTo()),"width"===t&&this._resizeButton()},_setOptionDisabled:function(t){this._super(t),this.menuInstance.option("disabled",t),this.button.attr("aria-disabled",t),this._toggleClass(this.button,null,"ui-state-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var t=this.options.width;return t===!1?(this.button.css("width",""),void 0):(null===t&&(t=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(t),void 0)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){var t=this._super();return t.disabled=this.element.prop("disabled"),t},_parseOptions:function(e){var i=this,s=[];e.each(function(e,n){s.push(i._parseOption(t(n),e))}),this.items=s},_parseOption:function(t,e){var i=t.parent("optgroup");return{element:t,index:e,value:t.val(),label:t.text(),optgroup:i.attr("label")||"",disabled:i.prop("disabled")||t.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}]),t.widget("ui.slider",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1
20
vendor: 32,006 bytes, line 20
20},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle"),o="<span tabindex='0'></span>",a=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)a.push(o);this.handles=n.add(t(a.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e).attr("tabIndex",0)})},_createRange:function(){var e=this.options;e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=t("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),("min"===e.range||"max"===e.range)&&this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,o,a,r,h,l,c=this,u=this.options;return u.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-c.values(e));(n>i||n===i&&(e===c._lastChangedValue||c.values(e)===u.min))&&(n=i,o=t(this),a=e)}),r=this._start(e,a),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=a,this._addClass(o,null,"ui-state-active"),o.trigger("focus"),h=o.offset(),l=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:e.pageX-h.left-o.width()/2,top:e.pageY-h.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),o=this._valueMin()+s*n,this._trimAlignValue(o)},_uiHash:function(t,e,i){var s={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(s.value=void 0!==e?e:this.values(t),s.values=i||this.values()),s},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var s,n,o=this.value(),a=this.values();this._hasMultipleValues()&&(n=this.values(e?0:1),o=this.values(e),2===this.options.values.length&&this.options.range===!0&&(i=0===e?Math.min(n,i):Math.max(n,i)),a[e]=i),i!==o&&(s=this._trigger("slide",t,this._uiHash(e,i,a)),s!==!1&&(this._hasMultipleValues()?this.values(e,i):this.value(i)))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),void 0):this._value()},values:function(e,i){var s,n,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),void 0;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this._hasMultipleValues()?this._values(e):this.value();for(s=this.options.values,n=arguments[0],o=0;s.length>o;o+=1)s[o]=this._trimAlignValue(n[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),this._super(e,i),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(i),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=n-1;s>=0;s--)this._change(null,s);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this._hasMultipleValues()){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step,s=Math.round((t-e)/i)*i;t=s+e,t>this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,i,s,n,o,a=this.options.range,r=this.options,h=this,l=this._animateOff?!1:r.animate,c={};this._hasMultipleValues()?this.handles.each(function(s){i=100*((h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())),c["horizontal"===h.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[l?"animate":"css"](c,r.animate),h.options.range===!0&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),o=this._valueMax(),i=o!==n?100*((s-n)/(o-n)):0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](c,r.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},r.animate),"max"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:100-i+"%"},r.animate),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:100-i+"%"},r.animate))},_handleEvents:{keydown:function(e){var i,s,n,o,a=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(t(e.target),null,"ui-state-active"),i=this._start(e,a),i===!1))return}switch(o=this.options.step,s=n=this._hasMultipleValues()?this.values(a):this.value(),e.keyCode){case t.ui.keyCode.HOME:n=this._valueMin();break;case t.ui.keyCode.END:n=this._valueMax();break;case t.ui.keyCode.PAGE_UP:n=this._trimAlignValue(s+(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(s-(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(s===this._valueMax())return;n=this._trimAlignValue(s+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(s===this._valueMin())return;n=this._trimAlignValue(s-o)}this._slide(e,a,n)},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),this._removeClass(t(e.target),null,"ui-state-active"))}}}),t.widget("ui.sortable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return t>=e&&e+i>t},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){var e=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),t.each(this.items,function(){e._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,i){var s=null,n=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+"-item")===o?(s=t(this),!1):void 0}),t.data(e.target,o.widgetName+"-item")===o&&(s=t(e.target)),s?!this.options.handle||i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(e,i,s){var n,o,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",a.cursor),this.storedStylesheet=t("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(o)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,o,a=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+a.scrollSpeed:e.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<a.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+a.scrollSpeed:e.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(e.pageY-this.document.scrollTop()<a.scrollSensitivity?r=this.document.scrollTop(this.document.scrollTop()-a.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<a.scrollSensitivity&&(r=this.document.scrollTop(this.document.scrollTop()+a.scrollSpeed)),e.pageX-this.document.scrollLeft()<a.scrollSensitivity?r=this.document.scrollLeft(this.document.scrollLeft()-a.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<a.scrollSensitivity&&(r=this.document.scrollLeft(this.document.scrollLeft()+a.scrollSpeed))),r!==!1&&t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],o=this._intersectsWithPointer(s),o&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(a.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new t.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+l>r&&h>s+l,d="y"===this.options.axis||e+c>o&&a>e+c,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperProportions.width/2>o&&a>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var e,i,s="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),n="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width),o=s&&n;return o?(e=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection(),this.floating?"right"===i||"down"===e?2:1:e&&("down"===e?2:1)):!1},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),s=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection();return this.floating&&n?"right"===n&&i||"left"===n&&!i:s&&("down"===s&&e||"up"===s&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function i(){r.push(this)}var s,n,o,a,r=[],h=[],l=this._connectWith();if(l&&e)for(s=l.length-1;s>=0;s--)for(o=t(l[s],this.document[0]),n=o.length-1;n>=0;n--)a=t.data(o[n],this.widgetFullName),a&&a!==this&&!a.options.disabled&&h.push([t.isFunction(a.options.items)?a.options.items.call(a.element):t(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);for(h.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),s=h.length-1;s>=0;s--)h[s][0].each(i);return t(r)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,o,a,r,h,l,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i],this.document[0]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(u.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=u.length-1;i>=0;i--)for(a=u[i][1],r=u[i][0],s=0,l=r.length;l>s;s++)h=t(r[s]),h.data(this.widgetName+"-item",a),c.push({item:h,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.floating=this.items.length?"x"===this.options.axis||this._isFloating(this.items[0].item):!1,this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,o;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),o=n.offset(),s.left=o.left,s.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]);return e._addClass(n,"ui-sortable-placeholder",i||e.currentItem[0].className)._removeClass(n,"ui-sortable-helper"),"tbody"===s?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("<tr>",e.document[0]).appendTo(n)):"tr"===s?e._createTrPlaceholder(e.currentItem,n):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,i){var s=this;e.children().each(function(){t("<td> </td>",s.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(i)})},_contactContainers:function(e){var i,s,n,o,a,r,h,l,c,u,d=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!t.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(d&&t.contains(this.containers[i].element[0],d.element[0]))continue;d=this.containers[i],p=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",e,this._uiHash(this)),this.containers[i].containerCache.over=0);if(d)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(n=1e4,o=null,c=d.floating||this._isFloating(this.currentItem),a=c?"left":"top",r=c?"width":"height",u=c?"pageX":"pageY",s=this.items.length-1;s>=0;s--)t.contains(this.containers[p].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(h=this.items[s].item.offset()[a],l=!1,e[u]-h>this.items[s][r]/2&&(l=!0),n>Math.abs(e[u]-h)&&(n=Math.abs(e[u]-h),o=this.items[s],this.direction=l?"up":"down"));if(!o&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1),void 0;o?this._rearrange(e,o,null,!0):this._rearrange(e,null,this.containers[p].element,!0),this._trigger("change",e,this._uiHash()),this.containers[p]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===n.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===n.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,o=e.pageX,a=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((a-this.originalPageY)/n.grid[1])*n.grid[1],a=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0],o=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;
21
vendor: 27,153 bytes, line 21
21this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){function i(t,e,i){return function(s){i._trigger(t,s,e._uiHash(e))}}this.reverting=!1;var s,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)("auto"===this._storedCSS[s]||"static"===this._storedCSS[s])&&(this._storedCSS[s]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&n.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||n.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(n.push(function(t){this._trigger("remove",t,this._uiHash())}),n.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)e||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(s=0;n.length>s;s++)n[s].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}}),t.widget("ui.spinner",{version:"1.12.1",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e=this._super(),i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);null!=n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t),void 0)},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var e=this.element[0]===t.ui.safeActiveElement(this.document[0]);e||(this.element.trigger("focus"),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===t.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:(this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&this.uiSpinner.height()>0&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){var i,s,n;return"culture"===t||"numberFormat"===t?(i=this._parse(this.element.val()),this.options[t]=e,this.element.val(this._format(i)),void 0):(("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(s=this.buttons.first().find(".ui-icon"),this._removeClass(s,null,this.options.icons.up),this._addClass(s,null,e.up),n=this.buttons.last().find(".ui-icon"),this._removeClass(n,null,this.options.icons.down),this._addClass(n,null,e.down)),this._super(t,e),void 0)},_setOptionDisabled:function(t){this._super(t),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable")},_setOptions:r(function(t){this._super(t)}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var t=this.value();return null===t?!1:t===this._adjustValue(t)},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:r(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:r(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:r(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:r(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?(r(this._value).call(this,t),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}),t.uiBackCompat!==!1&&t.widget("ui.spinner",t.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}}),t.ui.spinner,t.widget("ui.tabs",{version:"1.12.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var t=/#.*$/;return function(e){var i,s;i=e.href.replace(t,""),s=location.href.replace(t,"");try{i=decodeURIComponent(i)}catch(n){}try{s=decodeURIComponent(s)}catch(n){}return e.hash.length>1&&i===s}}(),_create:function(){var e=this,i=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,i.collapsible),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var e=this.options.active,i=this.options.collapsible,s=location.hash.substring(1);return null===e&&(s&&this.tabs.each(function(i,n){return t(n).attr("aria-controls")===s?(e=i,!1):void 0}),null===e&&(e=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===e||-1===e)&&(e=this.tabs.length?0:!1)),e!==!1&&(e=this.tabs.index(this.tabs.eq(e)),-1===e&&(e=i?!1:0)),!i&&e===!1&&this.anchors.length&&(e=0),e},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(e){var i=t(t.ui.safeActiveElement(this.document[0])).closest("li"),s=this.tabs.index(i),n=!0;if(!this._handlePageNav(e)){switch(e.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:s++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:n=!1,s--;break;case t.ui.keyCode.END:s=this.anchors.length-1;break;case t.ui.keyCode.HOME:s=0;break;case t.ui.keyCode.SPACE:return e.preventDefault(),clearTimeout(this.activating),this._activate(s),void 0;case t.ui.keyCode.ENTER:return e.preventDefault(),clearTimeout(this.activating),this._activate(s===this.options.active?!1:s),void 0;default:return}e.preventDefault(),clearTimeout(this.activating),s=this._focusNextTab(s,n),e.ctrlKey||e.metaKey||(i.attr("aria-selected","false"),this.tabs.eq(s).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",s)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(e){return e.altKey&&e.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):e.altKey&&e.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).trigger("focus"),t},_setOption:function(t,e){return"active"===t?(this._activate(e),void 0):(this._super(t,e),"collapsible"===t&&(this._toggleClass("ui-tabs-collapsible",null,e),e||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(e),"heightStyle"===t&&this._setupHeightStyle(e),void 0)},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this,i=this.tabs,s=this.anchors,n=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).attr({role:"presentation",tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=t(),this.anchors.each(function(i,s){var n,o,a,r=t(s).uniqueId().attr("id"),h=t(s).closest("li"),l=h.attr("aria-controls");e._isLocal(s)?(n=s.hash,a=n.substring(1),o=e.element.find(e._sanitizeSelector(n))):(a=h.attr("aria-controls")||t({}).uniqueId()[0].id,n="#"+a,o=e.element.find(n),o.length||(o=e._createPanel(a),o.insertAfter(e.panels[i-1]||e.tablist)),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),l&&h.data("ui-tabs-aria-controls",l),h.attr({"aria-controls":a,"aria-labelledby":r}),o.attr("aria-labelledby",r)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),i&&(this._off(i.not(this.tabs)),this._off(s.not(this.anchors)),this._off(n.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(e){var i,s,n;for(t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1),n=0;s=this.tabs[n];n++)i=t(s),e===!0||-1!==t.inArray(n,e)?(i.attr("aria-disabled","true"),this._addClass(i,null,"ui-state-disabled")):(i.removeAttr("aria-disabled"),this._removeClass(i,null,"ui-state-disabled"));this.options.disabled=e,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,e===!0)},_setupEvents:function(e){var i={};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),o=n.closest("li"),a=o[0]===s[0],r=a&&i.collapsible,h=r?t():this._getPanelForTab(o),l=s.length?this._getPanelForTab(s):t(),c={oldTab:s,oldPanel:l,newTab:r?t():o,newPanel:h};e.preventDefault(),o.hasClass("ui-state-disabled")||o.hasClass("ui-tabs-loading")||this.running||a&&!i.collapsible||this._trigger("beforeActivate",e,c)===!1||(i.active=r?!1:this.tabs.index(o),this.active=a?t():o,this.xhr&&this.xhr.abort(),l.length||h.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(o),e),this._toggle(e,c))},_toggle:function(e,i){function s(){o.running=!1,o._trigger("activate",e,i)}function n(){o._addClass(i.newTab.closest("li"),"ui-tabs-active","ui-state-active"),a.length&&o.options.show?o._show(a,o.options.show,s):(a.show(),s())}var o=this,a=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){o._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),n()}):(this._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),r.hide(),n()),r.attr("aria-hidden","true"),i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),a.length&&r.length?i.oldTab.attr("tabIndex",-1):a.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),a.attr("aria-hidden","false"),i.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+t.ui.escapeSelector(e)+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(e){var i=this.options.disabled;i!==!1&&(void 0===e?i=!1:(e=this._getIndex(e),i=t.isArray(i)?t.map(i,function(t){return t!==e?t:null}):t.map(this.tabs,function(t,i){return i!==e?i:null})),this._setOptionDisabled(i))},disable:function(e){var i=this.options.disabled;if(i!==!0){if(void 0===e)i=!0;else{if(e=this._getIndex(e),-1!==t.inArray(e,i))return;i=t.isArray(i)?t.merge([e],i).sort():[e]}this._setOptionDisabled(i)}},load:function(e,i){e=this._getIndex(e);var s=this,n=this.tabs.eq(e),o=n.find(".ui-tabs-anchor"),a=this._getPanelForTab(n),r={tab:n,panel:a},h=function(t,e){"abort"===e&&s.panels.stop(!1,!0),s._removeClass(n,"ui-tabs-loading"),a.removeAttr("aria-busy"),t===s.xhr&&delete s.xhr};this._isLocal(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,r)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(n,"ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.done(function(t,e,n){setTimeout(function(){a.html(t),s._trigger("load",i,r),h(n,e)},1)}).fail(function(t,e){setTimeout(function(){h(t,e)},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href").replace(/#.*$/,""),beforeSend:function(e,o){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:o},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}}),t.uiBackCompat!==!1&&t.widget("ui.tabs",t.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}}),t.ui.tabs,t.widget("ui.tooltip",{version:"1.12.1",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))},_removeDescribedBy:function(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=t("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=t([])},_setOption:function(e,i){var s=this;this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s.element[0],e.close(n,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var e=t(this);return e.is("[title]")?e.data("ui-tooltip-title",e.attr("title")).removeAttr("title"):void 0}))},_enable:function(){this.disabledTitles.each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))}),this.disabledTitles=t([])},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._registerCloseHandlers(e,s),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,o=e?e.type:null;return"string"==typeof s||s.nodeType||s.jquery?this._open(e,t,s):(i=s.call(t[0],function(i){n._delay(function(){t.data("ui-tooltip-open")&&(e&&(e.type=o),this._open(e,t,i))})}),i&&this._open(e,t,i),void 0)},_open:function(e,i,s){function n(t){l.of=t,a.is(":hidden")||a.position(l)}var o,a,r,h,l=t.extend({},this.options.position);if(s){if(o=this._find(i))return o.tooltip.find(".ui-tooltip-content").html(s),void 0;i.is("[title]")&&(e&&"mouseover"===e.type?i.attr("title",""):i.removeAttr("title")),o=this._tooltip(i),a=o.tooltip,this._addDescribedBy(i,a.attr("id")),a.find(".ui-tooltip-content").html(s),this.liveRegion.children().hide(),h=t("<div>").html(a.find(".ui-tooltip-content").html()),h.removeAttr("name").find("[name]").removeAttr("name"),h.removeAttr("id").find("[id]").removeAttr("id"),h.appendTo(this.liveRegion),this.options.track&&e&&/^mouse/.test(e.type)?(this._on(this.document,{mousemove:n}),n(e)):a.position(t.extend({of:i},this.options.position)),a.hide(),this._show(a,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(r=this.delayedShow=setInterval(function(){a.is(":visible")&&(n(l.of),clearInterval(r))},t.fx.interval)),this._trigger("open",e,{tooltip:a})}},_registerCloseHandlers:function(e,i){var s={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var s=t.Event(e);s.currentTarget=i[0],this.close(s,!0)}}};i[0]!==this.element[0]&&(s.remove=function(){this._removeTooltip(this._find(i).tooltip)}),e&&"mouseover"!==e.type||(s.mouseleave="close"),e&&"focusin"!==e.type||(s.focusout="close"),this._on(!0,i,s)},close:function(e){var i,s=this,n=t(e?e.currentTarget:this.element),o=this._find(n);return o?(i=o.tooltip,o.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&!n.attr("title")&&n.attr("title",n.data("ui-tooltip-title")),this._removeDescribedBy(n),o.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),o.closing=!0,this._trigger("close",e,{tooltip:i}),o.hiding||(o.closing=!1)),void 0):(n.removeData("ui-tooltip-open"),void 0)},_tooltip:function(e){var i=t("<div>").attr("role","tooltip"),s=t("<div>").appendTo(i),n=i.uniqueId().attr("id");return this._addClass(s,"ui-tooltip-content"),this._addClass(i,"ui-tooltip","ui-widget ui-widget-content"),i.appendTo(this._appendTo(e)),this.tooltips[n]={element:e,tooltip:i}},_find:function(t){var e=t.data("ui-tooltip-id");return e?this.tooltips[e]:null},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_appendTo:function(t){var e=t.closest(".ui-front, dialog");return e.length||(e=this.document[0].body),e},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur"),o=s.element;n.target=n.currentTarget=o[0],e.close(n,!0),t("#"+i).remove(),o.data("ui-tooltip-title")&&(o.attr("title")||o.attr("title",o.data("ui-tooltip-title")),o.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),t.uiBackCompat!==!1&&t.widget("ui.tooltip",t.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}}),t.ui.tooltip});
21; 22/* AUTOGENERATED: jquery.ui.touch-punch.min.js */ 23/*! 24 * jQuery UI Touch Punch 0.2.3 25 * 26 * Copyright 2011â2014, Dave Furfero 27 * Dual licensed under the MIT or GPL Version 2 licenses. 28 * 29 * Depends: 30 * jquery.ui.widget.js 31 * jquery.ui.mouse.js 32 */ 33!function(a){function f(a,b){if(!(a.originalEvent.touches.length>1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);; 34/* AUTOGENERATED: jquery.cookie.min.js */ 35(function(factory){if(typeof define==='function'&&define.amd){define(['jquery'],factory)}else if(typeof exports==='object'){factory(require('jquery'))}else factory(jQuery)}(function($){var pluses=/\+/g 36function encode(s){return config.raw?s:encodeURIComponent(s)} 37function decode(s){return config.raw?s:decodeURIComponent(s)} 38function stringifyCookieValue(value){return encode(config.json?JSON.stringify(value):String(value))} 39function parseCookieValue(s){if(s.indexOf('"')===0)s=s.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,'\\');try{s=decodeURIComponent(s.replace(pluses,' '));return config.json?JSON.parse(s):s}catch(e){}} 40function read(s,converter){var value=config.raw?s:parseCookieValue(s);return $.isFunction(converter)?converter(value):value};var config=$.cookie=function(key,value,options){if(arguments.length>1&&!$.isFunction(value)){options=$.extend({},config.defaults,options);if(typeof options.expires==='number'){var days=options.expires,t=options.expires=new Date();t.setTime(+t+days*864e+5)};return(document.cookie=[encode(key),'=',stringifyCookieValue(value),options.expires?'; expires='+options.expires.toUTCString():'',options.path?'; path='+options.path:'',options.domain?'; domain='+options.domain:'',options.secure?'; secure':''].join(''))};var result=key?undefined:{},cookies=document.cookie?document.cookie.split('; '):[];for(var i=0,l=cookies.length;i<l;i++){var parts=cookies[i].split('='),name=decode(parts.shift()),cookie=parts.join('=');if(key&&key===name){result=read(cookie,value);break};if(!key&&(cookie=read(cookie))!==undefined)result[name]=cookie};return result};config.defaults={};
vendor: 5,374 bytes, lines 40-47
40$.removeCookie=function(key,options){if($.cookie(key)===undefined)return false;$.cookie(key,'',$.extend({},options,{expires:-1}));return!$.cookie(key)}}));; 41/* AUTOGENERATED: underscore-min.js */ 42!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define("underscore",r):(n=n||self,function(){var t=n._,e=n._=r();e.noConflict=function(){return n._=t,e}}())}(this,(function(){ 43// Underscore.js 1.12.0 44// https://underscorejs.org 45// (c) 2009-2020 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors 46// Underscore may be freely distributed under the MIT license. 47 var n="1.12.0",r="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},t=Array.prototype,e=Object.prototype,u="undefined"!=typeof Symbol?Symbol.prototype:null,o=t.push,i=t.slice,a=e.toString,f=e.hasOwnProperty,c="undefined"!=typeof ArrayBuffer,l="undefined"!=typeof DataView,s=Array.isArray,p=Object.keys,v=Object.create,h=c&&ArrayBuffer.isView,y=isNaN,g=isFinite,d=!{toString:null}.propertyIsEnumerable("toString"),b=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],m=Math.pow(2,53)-1;function j(n,r){return r=null==r?n.length-1:+r,function(){for(var t=Math.max(arguments.length-r,0),e=Array(t),u=0;u<t;u++)e[u]=arguments[u+r];switch(r){case 0:return n.call(this,e);case 1:return n.call(this,arguments[0],e);case 2:return n.call(this,arguments[0],arguments[1],e)}var o=Array(r+1);for(u=0;u<r;u++)o[u]=arguments[u];return o[r]=e,n.apply(this,o)}}function _(n){var r=typeof n;return"function"===r||"object"===r&&!!n}function w(n){return void 0===n}function A(n){return!0===n||!1===n||"[object Boolean]"===a.call(n)}function x(n){var r="[object "+n+"]";return function(n){return a.call(n)===r}}var S=x("String"),O=x("Number"),M=x("Date"),E=x("RegExp"),B=x("Error"),N=x("Symbol"),I=x("ArrayBuffer"),k=x("Function"),T=r.document&&r.document.childNodes;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof T&&(k=function(n){return"function"==typeof n||!1});var D=k,R=x("Object"),F=l&&R(new DataView(new ArrayBuffer(8))),V="undefined"!=typeof Map&&R(new Map),P=x("DataView");var q=F?function(n){return null!=n&&D(n.getInt8)&&I(n.buffer)}:P,U=s||x("Array");function W(n,r){return null!=n&&f.call(n,r)}var z=x("Arguments");!function(){z(arguments)||(z=function(n){return W(n,"callee")})}();var L=z;function C(n){return O(n)&&y(n)}function K(n){return function(){return n}}function J(n){return function(r){var t=n(r);return"number"==typeof t&&t>=0&&t<=m}}function $(n){return function(r){return null==r?void 0:r[n]}}var G=$("byteLength"),H=J(G),Q=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;var X=c?function(n){return h?h(n)&&!q(n):H(n)&&Q.test(a.call(n))}:K(!1),Y=$("length");function Z(n,r){r=function(n){for(var r={},t=n.length,e=0;e<t;++e)r[n[e]]=!0;return{contains:function(n){return r[n]},push:function(t){return r[t]=!0,n.push(t)}}}(r);var t=b.length,u=n.constructor,o=D(u)&&u.prototype||e,i="constructor";for(W(n,i)&&!r.contains(i)&&r.push(i);t--;)(i=b[t])in n&&n[i]!==o[i]&&!r.contains(i)&&r.push(i)}function nn(n){if(!_(n))return[];if(p)return p(n);var r=[];for(var t in n)W(n,t)&&r.push(t);return d&&Z(n,r),r}function rn(n,r){var t=nn(r),e=t.length;if(null==n)return!e;for(var u=Object(n),o=0;o<e;o++){var i=t[o];if(r[i]!==u[i]||!(i in u))return!1}return!0}function tn(n){return n instanceof tn?n:this instanceof tn?void(this._wrapped=n):new tn(n)}function en(n){return new Uint8Array(n.buffer||n,n.byteOffset||0,G(n))}tn.VERSION=n,tn.prototype.value=function(){return this._wrapped},tn.prototype.valueOf=tn.prototype.toJSON=tn.prototype.value,tn.prototype.toString=function(){return String(this._wrapped)};var un="[object DataView]";function on(n,r,t,e){if(n===r)return 0!==n||1/n==1/r;if(null==n||null==r)return!1;if(n!=n)return r!=r;var o=typeof n;return("function"===o||"object"===o||"object"==typeof r)&&function n(r,t,e,o){r instanceof tn&&(r=r._wrapped);t instanceof tn&&(t=t._wrapped);var i=a.call(r);if(i!==a.call(t))return!1;if(F&&"[object Object]"==i&&q(r)){if(!q(t))return!1;i=un}switch(i){case"[object RegExp]":case"[object String]":return""+r==""+t;case"[object Number]":return+r!=+r?+t!=+t:0==+r?1/+r==1/t:+r==+t;case"[object Date]":case"[object Boolean]":return+r==+t;case"[object Symbol]":return u.valueOf.call(r)===u.valueOf.call(t);case"[object ArrayBuffer]":case un:return n(en(r),en(t),e,o)}var f="[object Array]"===i;if(!f&&X(r)){if(G(r)!==G(t))return!1;if(r.buffer===t.buffer&&r.byteOffset===t.byteOffset)return!0;f=!0}if(!f){if("object"!=typeof r||"object"!=typeof t)return!1;var c=r.constructor,l=t.constructor;if(c!==l&&!(D(c)&&c instanceof c&&D(l)&&l instanceof l)&&"constructor"in r&&"constructor"in t)return!1}o=o||[];var s=(e=e||[]).length;for(;s--;)if(e[s]===r)return o[s]===t;if(e.push(r),o.push(t),f){if((s=r.length)!==t.length)return!1;for(;s--;)if(!on(r[s],t[s],e,o))return!1}else{var p,v=nn(r);if(s=v.length,nn(t).length!==s)return!1;for(;s--;)if(p=v[s],!W(t,p)||!on(r[p],t[p],e,o))return!1}return e.pop(),o.pop(),!0}(n,r,t,e)}function an(n){if(!_(n))return[];var r=[];for(var t in n)r.push(t);return d&&Z(n,r),r}function fn(n){var r=Y(n);return function(t){if(null==t)return!1;var e=an(t);
vendor: 5,278 bytes, line 47
47if(Y(e))return!1;for(var u=0;u<r;u++)if(!D(t[n[u]]))return!1;return n!==hn||!D(t[cn])}}var cn="forEach",ln="has",sn=["clear","delete"],pn=["get",ln,"set"],vn=sn.concat(cn,pn),hn=sn.concat(pn),yn=["add"].concat(sn,cn,ln),gn=V?fn(vn):x("Map"),dn=V?fn(hn):x("WeakMap"),bn=V?fn(yn):x("Set"),mn=x("WeakSet");function jn(n){for(var r=nn(n),t=r.length,e=Array(t),u=0;u<t;u++)e[u]=n[r[u]];return e}function _n(n){for(var r={},t=nn(n),e=0,u=t.length;e<u;e++)r[n[t[e]]]=t[e];return r}function wn(n){var r=[];for(var t in n)D(n[t])&&r.push(t);return r.sort()}function An(n,r){return function(t){var e=arguments.length;if(r&&(t=Object(t)),e<2||null==t)return t;for(var u=1;u<e;u++)for(var o=arguments[u],i=n(o),a=i.length,f=0;f<a;f++){var c=i[f];r&&void 0!==t[c]||(t[c]=o[c])}return t}}var xn=An(an),Sn=An(nn),On=An(an,!0);function Mn(n){if(!_(n))return{};if(v)return v(n);var r=function(){};r.prototype=n;var t=new r;return r.prototype=null,t}function En(n){return _(n)?U(n)?n.slice():xn({},n):n}function Bn(n){return U(n)?n:[n]}function Nn(n){return tn.toPath(n)}function In(n,r){for(var t=r.length,e=0;e<t;e++){if(null==n)return;n=n[r[e]]}return t?n:void 0}function kn(n,r,t){var e=In(n,Nn(r));return w(e)?t:e}function Tn(n){return n}function Dn(n){return n=Sn({},n),function(r){return rn(r,n)}}function Rn(n){return n=Nn(n),function(r){return In(r,n)}}function Fn(n,r,t){if(void 0===r)return n;switch(null==t?3:t){case 1:return function(t){return n.call(r,t)};case 3:return function(t,e,u){return n.call(r,t,e,u)};case 4:return function(t,e,u,o){return n.call(r,t,e,u,o)}}return function(){return n.apply(r,arguments)}}function Vn(n,r,t){return null==n?Tn:D(n)?Fn(n,r,t):_(n)&&!U(n)?Dn(n):Rn(n)}function Pn(n,r){return Vn(n,r,1/0)}function qn(n,r,t){return tn.iteratee!==Pn?tn.iteratee(n,r):Vn(n,r,t)}function Un(){}function Wn(n,r){return null==r&&(r=n,n=0),n+Math.floor(Math.random()*(r-n+1))}tn.toPath=Bn,tn.iteratee=Pn;var zn=Date.now||function(){return(new Date).getTime()};function Ln(n){var r=function(r){return n[r]},t="(?:"+nn(n).join("|")+")",e=RegExp(t),u=RegExp(t,"g");return function(n){return n=null==n?"":""+n,e.test(n)?n.replace(u,r):n}}var Cn={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Kn=Ln(Cn),Jn=Ln(_n(Cn)),$n=tn.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},Gn=/(.)^/,Hn={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Qn=/\\|'|\r|\n|\u2028|\u2029/g;function Xn(n){return"\\"+Hn[n]}var Yn=0;function Zn(n,r,t,e,u){if(!(e instanceof r))return n.apply(t,u);var o=Mn(n.prototype),i=n.apply(o,u);return _(i)?i:o}var nr=j((function(n,r){var t=nr.placeholder,e=function(){for(var u=0,o=r.length,i=Array(o),a=0;a<o;a++)i[a]=r[a]===t?arguments[u++]:r[a];for(;u<arguments.length;)i.push(arguments[u++]);return Zn(n,e,this,this,i)};return e}));nr.placeholder=tn;var rr=j((function(n,r,t){if(!D(n))throw new TypeError("Bind must be called on a function");var e=j((function(u){return Zn(n,e,r,this,t.concat(u))}));return e})),tr=J(Y);function er(n,r,t,e){if(e=e||[],r||0===r){if(r<=0)return e.concat(n)}else r=1/0;for(var u=e.length,o=0,i=Y(n);o<i;o++){var a=n[o];if(tr(a)&&(U(a)||L(a)))if(r>1)er(a,r-1,t,e),u=e.length;else for(var f=0,c=a.length;f<c;)e[u++]=a[f++];else t||(e[u++]=a)}return e}var ur=j((function(n,r){var t=(r=er(r,!1,!1)).length;if(t<1)throw new Error("bindAll must be passed function names");for(;t--;){var e=r[t];n[e]=rr(n[e],n)}return n}));var or=j((function(n,r,t){return setTimeout((function(){return n.apply(null,t)}),r)})),ir=nr(or,tn,1);function ar(n){return function(){return!n.apply(this,arguments)}}function fr(n,r){var t;return function(){return--n>0&&(t=r.apply(this,arguments)),n<=1&&(r=null),t}}var cr=nr(fr,2);function lr(n,r,t){r=qn(r,t);for(var e,u=nn(n),o=0,i=u.length;o<i;o++)if(r(n[e=u[o]],e,n))return e}function sr(n){return function(r,t,e){t=qn(t,e);for(var u=Y(r),o=n>0?0:u-1;o>=0&&o<u;o+=n)if(t(r[o],o,r))return o;return-1}}var pr=sr(1),vr=sr(-1);function hr(n,r,t,e){for(var u=(t=qn(t,e,1))(r),o=0,i=Y(n);o<i;){var a=Math.floor((o+i)/2);t(n[a])<u?o=a+1:i=a}return o}function yr(n,r,t){return function(e,u,o){var a=0,f=Y(e);if("number"==typeof o)n>0?a=o>=0?o:Math.max(o+f,a):f=o>=0?Math.min(o+1,f):o+f+1;else if(t&&o&&f)return e[o=t(e,u)]===u?o:-1;if(u!=u)return(o=r(i.call(e,a,f),C))>=0?o+a:-1;for(o=n>0?a:f-1;o>=0&&o<f;o+=n)if(e[o]===u)return o;return-1}}var gr=yr(1,pr,hr),dr=yr(-1,vr);function br(n,r,t){var e=(tr(n)?pr:lr)(n,r,t);if(void 0!==e&&-1!==e)return n[e]}function mr(n,r,t){var e,u;if(r=Fn(r,t),tr(n))for(e=0,u=n.length;e<u;e++)r(n[e],e,n);else{var o=nn(n);for(e=0,u=o.length;e<u;e++)r(n[o[e]],o[e],n)}return n}function jr(n,r,t){r=qn(r,t);for(var e=!tr(n)&&nn(n),u=(e||n).length,o=Array(u),i=0;i<u;i++){var a=e?e[i]:i;o[i]=r(n[a],a,n)}return o}function _r(n){var r=function(r,t,e,u){var o=!tr(r)&&nn(r),i=(o||r).length,a=n>0?0:i-1;for(u||(e=r[o?o[a]:a],a+=n);a>=0&&a<i;a+=n){var f=o?o[a]:a;e=t(e,r[f],f,r)}return e};return function(n,t,e,u){var o=arguments.length>=3;return r(n,Fn(t,u,4),e,o)}}var wr=_r(1),Ar=_r(-1);function xr(n,r,t){var e=[];return r=qn(r,t),mr(n,(function(n,t,u){r(n,t,u)&&e.push(n)})),e}function Sr(n,r,t){r=qn(r,t);for(var e=!tr(n)&&nn(n),u=(e||n).length,o=0;o<u;o++){var i=e?e[o]:o;
vendor: 6,727 bytes, line 47
47if(!r(n[i],i,n))return!1}return!0}function Or(n,r,t){r=qn(r,t);for(var e=!tr(n)&&nn(n),u=(e||n).length,o=0;o<u;o++){var i=e?e[o]:o;if(r(n[i],i,n))return!0}return!1}function Mr(n,r,t,e){return tr(n)||(n=jn(n)),("number"!=typeof t||e)&&(t=0),gr(n,r,t)>=0}var Er=j((function(n,r,t){var e,u;return D(r)?u=r:(r=Nn(r),e=r.slice(0,-1),r=r[r.length-1]),jr(n,(function(n){var o=u;if(!o){if(e&&e.length&&(n=In(n,e)),null==n)return;o=n[r]}return null==o?o:o.apply(n,t)}))}));function Br(n,r){return jr(n,Rn(r))}function Nr(n,r,t){var e,u,o=-1/0,i=-1/0;if(null==r||"number"==typeof r&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=tr(n)?n:jn(n)).length;a<f;a++)null!=(e=n[a])&&e>o&&(o=e);else r=qn(r,t),mr(n,(function(n,t,e){((u=r(n,t,e))>i||u===-1/0&&o===-1/0)&&(o=n,i=u)}));return o}function Ir(n,r,t){if(null==r||t)return tr(n)||(n=jn(n)),n[Wn(n.length-1)];var e=tr(n)?En(n):jn(n),u=Y(e);r=Math.max(Math.min(r,u),0);for(var o=u-1,i=0;i<r;i++){var a=Wn(i,o),f=e[i];e[i]=e[a],e[a]=f}return e.slice(0,r)}function kr(n,r){return function(t,e,u){var o=r?[[],[]]:{};return e=qn(e,u),mr(t,(function(r,u){var i=e(r,u,t);n(o,r,i)})),o}}var Tr=kr((function(n,r,t){W(n,t)?n[t].push(r):n[t]=[r]})),Dr=kr((function(n,r,t){n[t]=r})),Rr=kr((function(n,r,t){W(n,t)?n[t]++:n[t]=1})),Fr=kr((function(n,r,t){n[t?0:1].push(r)}),!0),Vr=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function Pr(n,r,t){return r in t}var qr=j((function(n,r){var t={},e=r[0];if(null==n)return t;D(e)?(r.length>1&&(e=Fn(e,r[1])),r=an(n)):(e=Pr,r=er(r,!1,!1),n=Object(n));for(var u=0,o=r.length;u<o;u++){var i=r[u],a=n[i];e(a,i,n)&&(t[i]=a)}return t})),Ur=j((function(n,r){var t,e=r[0];return D(e)?(e=ar(e),r.length>1&&(t=r[1])):(r=jr(er(r,!1,!1),String),e=function(n,t){return!Mr(r,t)}),qr(n,e,t)}));function Wr(n,r,t){return i.call(n,0,Math.max(0,n.length-(null==r||t?1:r)))}function zr(n,r,t){return null==n||n.length<1?null==r||t?void 0:[]:null==r||t?n[0]:Wr(n,n.length-r)}function Lr(n,r,t){return i.call(n,null==r||t?1:r)}var Cr=j((function(n,r){return r=er(r,!0,!0),xr(n,(function(n){return!Mr(r,n)}))})),Kr=j((function(n,r){return Cr(n,r)}));function Jr(n,r,t,e){A(r)||(e=t,t=r,r=!1),null!=t&&(t=qn(t,e));for(var u=[],o=[],i=0,a=Y(n);i<a;i++){var f=n[i],c=t?t(f,i,n):f;r&&!t?(i&&o===c||u.push(f),o=c):t?Mr(o,c)||(o.push(c),u.push(f)):Mr(u,f)||u.push(f)}return u}var $r=j((function(n){return Jr(er(n,!0,!0))}));function Gr(n){for(var r=n&&Nr(n,Y).length||0,t=Array(r),e=0;e<r;e++)t[e]=Br(n,e);return t}var Hr=j(Gr);function Qr(n,r){return n._chain?tn(r).chain():r}function Xr(n){return mr(wn(n),(function(r){var t=tn[r]=n[r];tn.prototype[r]=function(){var n=[this._wrapped];return o.apply(n,arguments),Qr(this,t.apply(tn,n))}})),tn}mr(["pop","push","reverse","shift","sort","splice","unshift"],(function(n){var r=t[n];tn.prototype[n]=function(){var t=this._wrapped;return null!=t&&(r.apply(t,arguments),"shift"!==n&&"splice"!==n||0!==t.length||delete t[0]),Qr(this,t)}})),mr(["concat","join","slice"],(function(n){var r=t[n];tn.prototype[n]=function(){var n=this._wrapped;return null!=n&&(n=r.apply(n,arguments)),Qr(this,n)}}));var Yr=Xr({__proto__:null,VERSION:n,restArguments:j,isObject:_,isNull:function(n){return null===n},isUndefined:w,isBoolean:A,isElement:function(n){return!(!n||1!==n.nodeType)},isString:S,isNumber:O,isDate:M,isRegExp:E,isError:B,isSymbol:N,isArrayBuffer:I,isDataView:q,isArray:U,isFunction:D,isArguments:L,isFinite:function(n){return!N(n)&&g(n)&&!isNaN(parseFloat(n))},isNaN:C,isTypedArray:X,isEmpty:function(n){if(null==n)return!0;var r=Y(n);return"number"==typeof r&&(U(n)||S(n)||L(n))?0===r:0===Y(nn(n))},isMatch:rn,isEqual:function(n,r){return on(n,r)},isMap:gn,isWeakMap:dn,isSet:bn,isWeakSet:mn,keys:nn,allKeys:an,values:jn,pairs:function(n){for(var r=nn(n),t=r.length,e=Array(t),u=0;u<t;u++)e[u]=[r[u],n[r[u]]];return e},invert:_n,functions:wn,methods:wn,extend:xn,extendOwn:Sn,assign:Sn,defaults:On,create:function(n,r){var t=Mn(n);return r&&Sn(t,r),t},clone:En,tap:function(n,r){return r(n),n},get:kn,has:function(n,r){for(var t=(r=Nn(r)).length,e=0;e<t;e++){var u=r[e];if(!W(n,u))return!1;n=n[u]}return!!t},mapObject:function(n,r,t){r=qn(r,t);for(var e=nn(n),u=e.length,o={},i=0;i<u;i++){var a=e[i];o[a]=r(n[a],a,n)}return o},identity:Tn,constant:K,noop:Un,toPath:Bn,property:Rn,propertyOf:function(n){return null==n?Un:function(r){return kn(n,r)}},matcher:Dn,matches:Dn,times:function(n,r,t){var e=Array(Math.max(0,n));r=Fn(r,t,1);for(var u=0;u<n;u++)e[u]=r(u);return e},random:Wn,now:zn,escape:Kn,unescape:Jn,templateSettings:$n,template:function(n,r,t){!r&&t&&(r=t),r=On({},r,tn.templateSettings);var e,u=RegExp([(r.escape||Gn).source,(r.interpolate||Gn).source,(r.evaluate||Gn).source].join("|")+"|$","g"),o=0,i="__p+='";n.replace(u,(function(r,t,e,u,a){return i+=n.slice(o,a).replace(Qn,Xn),o=a+r.length,t?i+="'+\n((__t=("+t+"))==null?'':_.escape(__t))+\n'":e?i+="'+\n((__t=("+e+"))==null?'':__t)+\n'":u&&(i+="';\n"+u+"\n__p+='"),r})),i+="';\n",r.variable||(i="with(obj||{}){\n"+i+"}\n"),i="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+i+"return __p;\n";try{e=new Function(r.variable||"obj","_",i)}catch(n){throw n.source=i,n}var a=function(n){return e.call(this,n,tn)},f=r.variable||"obj";return a.source="function("+f+"){\n"+i+"}",a},result:function(n,r,t){var e=(r=Nn(r)).length;if(!e)return D(t)?t.call(n):t;for(var u=0;u<e;u++){var o=null==n?void 0:n[r[u]];void 0===o&&(o=t,u=e),n=D(o)?o.call(n):o}return n},uniqueId:function(n){var r=++Yn+"";return n?n+r:r},chain:function(n){var r=tn(n);return r._chain=!0,r},iteratee:Pn,partial:nr,bind:rr,bindAll:ur,memoize:function(n,r){var t=function(e){var u=t.cache,o=""+(r?r.apply(this,arguments):e);return W(u,o)||(u[o]=n.apply(this,arguments)),u[o]};return t.cache={},t},delay:or,defer:ir,throttle:function(n,r,t){var e,u,o,i,a=0;t||(t={});var f=function(){a=!1===t.leading?0:zn(),e=null,i=n.apply(u,o),e||(u=o=null)},c=function(){var c=zn();a||!1!==t.leading||(a=c);var l=r-(c-a);return u=this,o=arguments,l<=0||l>r?(e&&(clearTimeout(e),e=null),a=c,i=n.apply(u,o),e||(u=o=null)):e||!1===t.trailing||(e=setTimeout(f,l)),i};return c.cancel=function(){clearTimeout(e),a=0,e=u=o=null},c},debounce:function(n,r,t){var e,u,o=function(r,t){e=null,t&&(u=n.apply(r,t))},i=j((function(i){if(e&&clearTimeout(e),t){var a=!e;e=setTimeout(o,r),a&&(u=n.apply(this,i))}else e=or(o,r,this,i);return u}));return i.cancel=function(){clearTimeout(e),e=null},i},wrap:function(n,r){return nr(r,n)},negate:ar,compose:function(){var n=arguments,r=n.length-1;return function(){for(var t=r,e=n[r].apply(this,arguments);t--;)e=n[t].call(this,e);return e}},after:function(n,r){return function(){if(--n<1)return r.apply(this,arguments)}}
47,before:fr,once:cr,findKey:lr,findIndex:pr,findLastIndex:vr,sortedIndex:hr,indexOf:gr,lastIndexOf:dr,find:br,detect:br,findWhere:function(n,r){return br(n,Dn(r))},each:mr,forEach:mr,map:jr,collect:jr,reduce:wr,foldl:wr,inject:wr,reduceRight:Ar,foldr:Ar,filter:xr,select:xr,reject:function(n,r,t){return xr(n,ar(qn(r)),t)},every:Sr,all:Sr,some:Or,any:Or,contains:Mr,includes:Mr,include:Mr,invoke:Er,pluck:Br,where:function(n,r){return xr(n,Dn(r))},max:Nr,min:function(n,r,t){var e,u,o=1/0,i=1/0;if(null==r||"number"==typeof r&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=tr(n)?n:jn(n)).length;a<f;a++)null!=(e=n[a])&&e<o&&(o=e);else r=qn(r,t),mr(n,(function(n,t,e){((u=r(n,t,e))<i||u===1/0&&o===1/0)&&(o=n,i=u)}));return o},shuffle:function(n){return Ir(n,1/0)},sample:Ir,sortBy:function(n,r,t){var e=0;return r=qn(r,t),Br(jr(n,(function(n,t,u){return{value:n,index:e++,criteria:r(n,t,u)}})).sort((function(n,r){var t=n.criteria,e=r.criteria;if(t!==e){if(t>e||void 0===t)return 1;if(t<e||void 0===e)return-1}return n.index-r.index})),"value")},groupBy:Tr,indexBy:Dr,countBy:Rr,partition:Fr,toArray:function(n){return n?U(n)?i.call(n):S(n)?n.match(Vr):tr(n)?jr(n,Tn):jn(n):[]},size:function(n){return null==n?0:tr(n)?n.length:nn(n).length},pick:qr,omit:Ur,first:zr,head:zr,take:zr,initial:Wr,last:function(n,r,t){return null==n||n.length<1?null==r||t?void 0:[]:null==r||t?n[n.length-1]:Lr(n,Math.max(0,n.length-r))},rest:Lr,tail:Lr,drop:Lr,compact:function(n){return xr(n,Boolean)},flatten:function(n,r){return er(n,r,!1)},without:Kr,uniq:Jr,unique:Jr,union:$r,intersection:function(n){for(var r=[],t=arguments.length,e=0,u=Y(n);e<u;e++){var o=n[e];if(!Mr(r,o)){var i;for(i=1;i<t&&Mr(arguments[i],o);i++);i===t&&r.push(o)}}return r},difference:Cr,unzip:Gr,transpose:Gr,zip:Hr,object:function(n,r){for(var t={},e=0,u=Y(n);e<u;e++)r?t[n[e]]=r[e]:t[n[e][0]]=n[e][1];return t},range:function(n,r,t){null==r&&(r=n||0,n=0),t||(t=r<n?-1:1);for(var e=Math.max(Math.ceil((r-n)/t),0),u=Array(e),o=0;o<e;o++,n+=t)u[o]=n;return u},chunk:function(n,r){if(null==r||r<1)return[];for(var t=[],e=0,u=n.length;e<u;)t.push(i.call(n,e,e+=r));return t},mixin:Xr,default:tn});return Yr._=Yr,Yr}));; 48/* AUTOGENERATED: underscore.string.min.js */ 49/* 50* Underscore.string 51* (c) 2010 Esa-Matti Suuronen <esa-matti aet suuronen dot org> 52* Underscore.string is freely distributable under the terms of the MIT license. 53* Documentation: https://github.com/epeli/underscore.string 54* Some code is borrowed from MooTools and Alexandru Marasteanu. 55* Version '3.3.4' 56* @preserve 57*/ 58(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.s=f()}})(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){var trim=require("./trim");var decap=require("./decapitalize");module.exports=function camelize(str,decapitalize){str=trim(str).replace(/[-_\s]+(.)?/g,function(match,c){return c?c.toUpperCase():""});if(decapitalize===true){return decap(str)}else{return str}}},{"./decapitalize":10,"./trim":65}],2:[function(require,module,exports){var makeString=require("./helper/makeString");module.exports=function capitalize(str,lowercaseRest){str=makeString(str);var remainingChars=!lowercaseRest?str.slice(1):str.slice(1).toLowerCase();return str.charAt(0).toUpperCase()+remainingChars}},{"./helper/makeString":20}],3:[function(require,module,exports){var makeString=require("./helper/makeString");module.exports=function chars(str){return makeString(str).split("")}},{"./helper/makeString":20}],4:[function(require,module,exports){module.exports=function chop(str,step){if(str==null)return[];str=String(str);step=~~step;return step>0?str.match(new RegExp(".{1,"+step+"}","g")):[str]}},{}],5:[function(require,module,exports){var capitalize=require("./capitalize");var camelize=require("./camelize");var makeString=require("./helper/makeString");module.exports=function classify(str){str=makeString(str);return capitalize(camelize(str.replace(/[\W_]/g," ")).replace(/\s/g,""))}},{"./camelize":1,"./capitalize":2,"./helper/makeString":20}],6:[function(require,module,exports){var trim=require("./trim");module.exports=function clean(str){return trim(str).replace(/\s\s+/g," ")}},{"./trim":65}],7:[function(require,module,exports){var makeString=require("./helper/makeString");var from="Ä Ã Ã¡Ã¤Ã¢Ã£Ã¥Ã¦ÄÄÄÄÄèéëêÄĥìÃïîĵÅľÅÅòóöÅôõðøÅÈÅÅ¡ÅÅ¥ÈÅ£Åùúüűûñÿýçżźž",to="aaaaaaaaaccceeeeeghiiiijllnnoooooooossssstttuuuuuunyyczzz";from+=from.toUpperCase();to+=to.toUpperCase();to=to.split("");from+="Ã";to.push("ss");module.exports=function cleanDiacritics(str){return makeString(str).replace(/.{1}/g,function(c){var index=from.indexOf(c);return index===-1?c:to[index]})}},{"./helper/makeString":20}],8:[function(require,module,exports){var makeString=require("./helper/makeString");module.exports=function(str,substr){str=makeString(str);substr=makeString(substr);if(str.length===0||substr.length===0)return 0;
58return str.split(substr).length-1}},{"./helper/makeString":20}],9:[function(require,module,exports){var trim=require("./trim");module.exports=function dasherize(str){return trim(str).replace(/([A-Z])/g,"-$1").replace(/[-_\s]+/g,"-").toLowerCase()}},{"./trim":65}],10:[function(require,module,exports){var makeString=require("./helper/makeString");module.exports=function decapitalize(str){str=makeString(str);return str.charAt(0).toLowerCase()+str.slice(1)}},{"./helper/makeString":20}],11:[function(require,module,exports){var makeString=require("./helper/makeString");function getIndent(str){var matches=str.match(/^[\s\\t]*/gm);var indent=matches[0].length;for(var i=1;i<matches.length;i++){indent=Math.min(matches[i].length,indent)}return indent}module.exports=function dedent(str,pattern){str=makeString(str);var indent=getIndent(str);var reg;if(indent===0)return str;if(typeof pattern==="string"){reg=new RegExp("^"+pattern,"gm")}else{reg=new RegExp("^[ \\t]{"+indent+"}","gm")}return str.replace(reg,"")}},{"./helper/makeString":20}],12:[function(require,module,exports){var makeString=require("./helper/makeString");var toPositive=require("./helper/toPositive");module.exports=function endsWith(str,ends,position){str=makeString(str);ends=""+ends;if(typeof position=="undefined"){position=str.length-ends.length}else{position=Math.min(toPositive(position),str.length)-ends.length}return position>=0&&str.indexOf(ends,position)===position}},{"./helper/makeString":20,"./helper/toPositive":22}],13:[function(require,module,exports){var makeString=require("./helper/makeString");var escapeChars=require("./helper/escapeChars");var regexString="[";for(var key in escapeChars){regexString+=key}regexString+="]";var regex=new RegExp(regexString,"g");module.exports=function escapeHTML(str){return makeString(str).replace(regex,function(m){return"&"+escapeChars[m]+";"})}},{"./helper/escapeChars":17,"./helper/makeString":20}],14:[function(require,module,exports){module.exports=function(){var result={};for(var prop in this){if(!this.hasOwnProperty(prop)||prop.match(/^(?:include|contains|reverse|join|map|wrap)$/))continue;result[prop]=this[prop]}return result}},{}],15:[function(require,module,exports){var makeString=require("./makeString");module.exports=function adjacent(str,direction){str=makeString(str);if(str.length===0){return""}return str.slice(0,-1)+String.fromCharCode(str.charCodeAt(str.length-1)+direction)}},{"./makeString":20}],16:[function(require,module,exports){var escapeRegExp=require("./escapeRegExp");module.exports=function defaultToWhiteSpace(characters){if(characters==null)return"\\s";else if(characters.source)return characters.source;else return"["+escapeRegExp(characters)+"]"}},{"./escapeRegExp":18}],17:[function(require,module,exports){var escapeChars={"¢":"cent","£":"pound","Â¥":"yen","â¬":"euro","©":"copy","®":"reg","<":"lt",">":"gt",'"':"quot","&":"amp","'":"#39"};module.exports=escapeChars},{}],18:[function(require,module,exports){var makeString=require("./makeString");module.exports=function escapeRegExp(str){return makeString(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}},{"./makeString":20}],19:[function(require,module,exports){var htmlEntities={nbsp:" ",cent:"¢",pound:"£",yen:"Â¥",euro:"â¬",copy:"©",reg:"®",lt:"<",gt:">",quot:'"',amp:"&",apos:"'"};module.exports=htmlEntities},{}],20:[function(require,module,exports){module.exports=function makeString(object){if(object==null)return"";return""+object}},{}],21:[function(require,module,exports){module.exports=function strRepeat(str,qty){if(qty<1)return"";var result="";while(qty>0){if(qty&1)result+=str;qty>>=1,str+=str}return result}},{}],22:[function(require,module,exports){module.exports=function toPositive(number){return number<0?0:+number||0}},{}],23:[function(require,module,exports){var capitalize=require("./capitalize");var underscored=require("./underscored");var trim=require("./trim");module.exports=function humanize(str){return capitalize(trim(underscored(str).replace(/_id$/,"").replace(/_/g," ")))}},{"./capitalize":2,"./trim":65,"./underscored":67}],24:[function(require,module,exports){var makeString=require("./helper/makeString");module.exports=function include(str,needle){if(needle==="")return true;return makeString(str).indexOf(needle)!==-1}},{"./helper/makeString":20}],25:[function(require,module,exports){/* 59* Underscore.string 60* (c) 2010 Esa-Matti Suuronen <esa-matti aet suuronen dot org> 61* Underscore.string is freely distributable under the terms of the MIT license. 62* Documentation: https://github.com/epeli/underscore.string 63* Some code is borrowed from MooTools and Alexandru Marasteanu. 64* Version '3.3.4' 65* @preserve 66*/ 67 "use strict";function s(value){if(!(this instanceof s))return new s(value);this._wrapped=value}s.VERSION="3.3.4";s.isBlank=require("./isBlank");s.stripTags=require("./stripTags");s.capitalize=require("./capitalize");s.decapitalize=require("./decapitalize");s.chop=require("./chop");s.trim=require("./trim");s.clean=require("./clean");s.cleanDiacritics=require("./cleanDiacritics");s.count=require("./count");s.chars=require("./chars");s.swapCase=require("./swapCase");s.escapeHTML=require("./escapeHTML");s.unescapeHTML=require("./unescapeHTML");s.splice=require("./splice");s.insert=require("./insert");
67s.replaceAll=require("./replaceAll");s.include=require("./include");s.join=require("./join");s.lines=require("./lines");s.dedent=require("./dedent");s.reverse=require("./reverse");s.startsWith=require("./startsWith");s.endsWith=require("./endsWith");s.pred=require("./pred");s.succ=require("./succ");s.titleize=require("./titleize");s.camelize=require("./camelize");s.underscored=require("./underscored");s.dasherize=require("./dasherize");s.classify=require("./classify");s.humanize=require("./humanize");s.ltrim=require("./ltrim");s.rtrim=require("./rtrim");s.truncate=require("./truncate");s.prune=require("./prune");s.words=require("./words");s.pad=require("./pad");s.lpad=require("./lpad");s.rpad=require("./rpad");s.lrpad=require("./lrpad");s.sprintf=require("./sprintf");s.vsprintf=require("./vsprintf");s.toNumber=require("./toNumber");s.numberFormat=require("./numberFormat");s.strRight=require("./strRight");s.strRightBack=require("./strRightBack");s.strLeft=require("./strLeft");s.strLeftBack=require("./strLeftBack");s.toSentence=require("./toSentence");s.toSentenceSerial=require("./toSentenceSerial");s.slugify=require("./slugify");s.surround=require("./surround");s.quote=require("./quote");s.unquote=require("./unquote");s.repeat=require("./repeat");s.naturalCmp=require("./naturalCmp");s.levenshtein=require("./levenshtein");s.toBoolean=require("./toBoolean");s.exports=require("./exports");s.escapeRegExp=require("./helper/escapeRegExp");s.wrap=require("./wrap");s.map=require("./map");s.strip=s.trim;s.lstrip=s.ltrim;s.rstrip=s.rtrim;s.center=s.lrpad;s.rjust=s.lpad;s.ljust=s.rpad;s.contains=s.include;s.q=s.quote;s.toBool=s.toBoolean;s.camelcase=s.camelize;s.mapChars=s.map;s.prototype={value:function value(){return this._wrapped}};function fn2method(key,fn){if(typeof fn!=="function")return;s.prototype[key]=function(){var args=[this._wrapped].concat(Array.prototype.slice.call(arguments));var res=fn.apply(null,args);return typeof res==="string"?new s(res):res}}for(var key in s)fn2method(key,s[key]);fn2method("tap",function tap(string,fn){return fn(string)});function prototype2method(methodName){fn2method(methodName,function(context){var args=Array.prototype.slice.call(arguments,1);return String.prototype[methodName].apply(context,args)})}var prototypeMethods=["toUpperCase","toLowerCase","split","replace","slice","substring","substr","concat"];for(var method in prototypeMethods)prototype2method(prototypeMethods[method]);module.exports=s},{"./camelize":1,"./capitalize":2,"./chars":3,"./chop":4,"./classify":5,"./clean":6,"./cleanDiacritics":7,"./count":8,"./dasherize":9,"./decapitalize":10,"./dedent":11,"./endsWith":12,"./escapeHTML":13,"./exports":14,"./helper/escapeRegExp":18,"./humanize":23,"./include":24,"./insert":26,"./isBlank":27,"./join":28,"./levenshtein":29,"./lines":30,"./lpad":31,"./lrpad":32,"./ltrim":33,"./map":34,"./naturalCmp":35,"./numberFormat":38,"./pad":39,"./pred":40,"./prune":41,"./quote":42,"./repeat":43,"./replaceAll":44,"./reverse":45,"./rpad":46,"./rtrim":47,"./slugify":48,"./splice":49,"./sprintf":50,"./startsWith":51,"./strLeft":52,"./strLeftBack":53,"./strRight":54,"./strRightBack":55,"./stripTags":56,"./succ":57,"./surround":58,"./swapCase":59,"./titleize":60,"./toBoolean":61,"./toNumber":62,"./toSentence":63,"./toSentenceSerial":64,"./trim":65,"./truncate":66,"./underscored":67,"./unescapeHTML":68,"./unquote":69,"./vsprintf":70,"./words":71,"./wrap":72}],26:[function(require,module,exports){var splice=require("./splice");module.exports=function insert(str,i,substr){return splice(str,i,0,substr)}},{"./splice":49}],27:[function(require,module,exports){var makeString=require("./helper/makeString");module.exports=function isBlank(str){return/^\s*$/.test(makeString(str))}},{"./helper/makeString":20}],28:[function(require,module,exports){var makeString=require("./helper/makeString");var slice=[].slice;module.exports=function join(){var args=slice.call(arguments),separator=args.shift();return args.join(makeString(separator))}},{"./helper/makeString":20}],29:[function(require,module,exports){var makeString=require("./helper/makeString");module.exports=function levenshtein(str1,str2){"use strict";str1=makeString(str1);str2=makeString(str2);if(str1===str2)return 0;if(!str1||!str2)return Math.max(str1.length,str2.length);var prevRow=new Array(str2.length+1);for(var i=0;i<prevRow.length;++i){prevRow[i]=i}for(i=0;i<str1.length;++i){var nextCol=i+1;for(var j=0;j<str2.length;++j){var curCol=nextCol;nextCol=prevRow[j]+(str1.charAt(i)===str2.charAt(j)?0:1);var tmp=curCol+1;if(nextCol>tmp){nextCol=tmp}tmp=prevRow[j+1]+1;if(nextCol>tmp){nextCol=tmp}prevRow[j]=curCol}prevRow[j]=nextCol}return nextCol}},{"./helper/makeString":20}],30:[function(require,module,exports){module.exports=function lines(str){if(str==null)return[];return String(str).split(/\r\n?|\n/)}},{}],31:[function(require,module,exports){var pad=require("./pad");module.exports=function lpad(str,length,padStr){return pad(str,length,padStr)}}
67,{"./pad":39}],32:[function(require,module,exports){var pad=require("./pad");module.exports=function lrpad(str,length,padStr){return pad(str,length,padStr,"both")}},{"./pad":39}],33:[function(require,module,exports){var makeString=require("./helper/makeString");var defaultToWhiteSpace=require("./helper/defaultToWhiteSpace");var nativeTrimLeft=String.prototype.trimLeft;module.exports=function ltrim(str,characters){str=makeString(str);if(!characters&&nativeTrimLeft)return nativeTrimLeft.call(str);characters=defaultToWhiteSpace(characters);return str.replace(new RegExp("^"+characters+"+"),"")}},{"./helper/defaultToWhiteSpace":16,"./helper/makeString":20}],34:[function(require,module,exports){var makeString=require("./helper/makeString");module.exports=function(str,callback){str=makeString(str);if(str.length===0||typeof callback!=="function")return str;return str.replace(/./g,callback)}},{"./helper/makeString":20}],35:[function(require,module,exports){module.exports=function naturalCmp(str1,str2){if(str1==str2)return 0;if(!str1)return-1;if(!str2)return 1;var cmpRegex=/(\.\d+|\d+|\D+)/g,tokens1=String(str1).match(cmpRegex),tokens2=String(str2).match(cmpRegex),count=Math.min(tokens1.length,tokens2.length);for(var i=0;i<count;i++){var a=tokens1[i],b=tokens2[i];if(a!==b){var num1=+a;var num2=+b;if(num1===num1&&num2===num2){return num1>num2?1:-1}return a<b?-1:1}}if(tokens1.length!=tokens2.length)return tokens1.length-tokens2.length;return str1<str2?-1:1}},{}],36:[function(require,module,exports){(function(window){var re={not_string:/[^s]/,number:/[diefg]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijosuxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[\+\-]/};function sprintf(){var key=arguments[0],cache=sprintf.cache;if(!(cache[key]&&cache.hasOwnProperty(key))){cache[key]=sprintf.parse(key)}return sprintf.format.call(null,cache[key],arguments)}sprintf.format=function(parse_tree,argv){var cursor=1,tree_length=parse_tree.length,node_type="",arg,output=[],i,k,match,pad,pad_character,pad_length,is_positive=true,sign="";for(i=0;i<tree_length;i++){node_type=get_type(parse_tree[i]);if(node_type==="string"){output[output.length]=parse_tree[i]}else if(node_type==="array"){match=parse_tree[i];if(match[2]){arg=argv[cursor];for(k=0;k<match[2].length;k++){if(!arg.hasOwnProperty(match[2][k])){throw new Error(sprintf("[sprintf] property '%s' does not exist",match[2][k]))}arg=arg[match[2][k]]}}else if(match[1]){arg=argv[match[1]]}else{arg=argv[cursor++]}if(get_type(arg)=="function"){arg=arg()}if(re.not_string.test(match[8])&&re.not_json.test(match[8])&&(get_type(arg)!="number"&&isNaN(arg))){throw new TypeError(sprintf("[sprintf] expecting number but found %s",get_type(arg)))}if(re.number.test(match[8])){is_positive=arg>=0}switch(match[8]){case"b":arg=arg.toString(2);break;case"c":arg=String.fromCharCode(arg);break;case"d":case"i":arg=parseInt(arg,10);break;case"j":arg=JSON.stringify(arg,null,match[6]?parseInt(match[6]):0);break;case"e":arg=match[7]?arg.toExponential(match[7]):arg.toExponential();break;case"f":arg=match[7]?parseFloat(arg).toFixed(match[7]):parseFloat(arg);break;case"g":arg=match[7]?parseFloat(arg).toPrecision(match[7]):parseFloat(arg);break;case"o":arg=arg.toString(8);break;case"s":arg=(arg=String(arg))&&match[7]?arg.substring(0,match[7]):arg;break;case"u":arg=arg>>>0;break;case"x":arg=arg.toString(16);break;case"X":arg=arg.toString(16).toUpperCase();break}if(re.json.test(match[8])){output[output.length]=arg}else{if(re.number.test(match[8])&&(!is_positive||match[3])){sign=is_positive?"+":"-";arg=arg.toString().replace(re.sign,"")}else{sign=""}pad_character=match[4]?match[4]==="0"?"0":match[4].charAt(1):" ";pad_length=match[6]-(sign+arg).length;pad=match[6]?pad_length>0?str_repeat(pad_character,pad_length):"":"";output[output.length]=match[5]?sign+arg+pad:pad_character==="0"?sign+pad+arg:pad+sign+arg}}}return output.join("")};sprintf.cache={};sprintf.parse=function(fmt){var _fmt=fmt,match=[],parse_tree=[],arg_names=0;while(_fmt){if((match=re.text.exec(_fmt))!==null){parse_tree[parse_tree.length]=match[0]}else if((match=re.modulo.exec(_fmt))!==null){parse_tree[parse_tree.length]="%"}else if((match=re.placeholder.exec(_fmt))!==null){if(match[2]){arg_names|=1;var field_list=[],replacement_field=match[2],field_match=[];if((field_match=re.key.exec(replacement_field))!==null){field_list[field_list.length]=field_match[1];while((replacement_field=replacement_field.substring(field_match[0].length))!==""){if((field_match=re.key_access.exec(replacement_field))!==null){field_list[field_list.length]=field_match[1]}else if((field_match=re.index_access.exec(replacement_field))!==null){field_list[field_list.length]=field_match[1]}else{throw new SyntaxError("[sprintf] failed to parse named argument key")}}}else{throw new SyntaxError("[sprintf] failed to parse named argument key")}match[2]=field_list}else{arg_names|=2}if(arg_names===3){throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported")}parse_tree[parse_tree.length]=match}else{throw new SyntaxError("[sprintf] unexpected placeholder")}_fmt=_fmt.substring(match[0].length)}return parse_tree};var vsprintf=function(fmt,argv,_argv){_argv=(argv||[]).slice(0);_argv.splice(0,0,fmt);return sprintf.apply(null,_argv)};function get_type(variable){return Object.prototype.toString.call(variable).slice(8,-1).toLowerCase()}function str_repeat(input,multiplier){return Array(multiplier+1).join(input)}if(typeof exports!=="undefined"){exports.sprintf=sprintf;exports.vsprintf=vsprintf}else{window.sprintf=sprintf;window.vsprintf=vsprintf;if(typeof define==="function"&&define.amd){define(function(){return{sprintf:sprintf,vsprintf:vsprintf}})}}})(typeof window==="undefined"?this:window)},{}],37:[function(require,module,exports){(function(global){module.exports=deprecate;function deprecate(fn,msg){if(config("noDeprecation")){return fn}var warned=false;function deprecated(){if(!warned){if(config("throwDeprecation")){throw new Error(msg)}else if(config("traceDeprecation")){console.trace(msg)}else{console.warn(msg)}warned=true}return fn.apply(this,arguments)}return deprecated}function config(name){try{if(!global.localStorage)return false}catch(_){return false}var val=global.localStorage[name];if(null==val)return false;return String(val).toLowerCase()==="true"}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],38:[function(require,module,exports){module.exports=function numberFormat(number,dec,dsep,tsep){if(isNaN(number)||number==null)return"";number=number.toFixed(~~dec);
67tsep=typeof tsep=="string"?tsep:",";var parts=number.split("."),fnums=parts[0],decimals=parts[1]?(dsep||".")+parts[1]:"";return fnums.replace(/(\d)(?=(?:\d{3})+$)/g,"$1"+tsep)+decimals}},{}],39:[function(require,module,exports){var makeString=require("./helper/makeString");var strRepeat=require("./helper/strRepeat");module.exports=function pad(str,length,padStr,type){str=makeString(str);length=~~length;var padlen=0;if(!padStr)padStr=" ";else if(padStr.length>1)padStr=padStr.charAt(0);switch(type){case"right":padlen=length-str.length;return str+strRepeat(padStr,padlen);case"both":padlen=length-str.length;return strRepeat(padStr,Math.ceil(padlen/2))+str+strRepeat(padStr,Math.floor(padlen/2));default:padlen=length-str.length;return strRepeat(padStr,padlen)+str}}},{"./helper/makeString":20,"./helper/strRepeat":21}],40:[function(require,module,exports){var adjacent=require("./helper/adjacent");module.exports=function succ(str){return adjacent(str,-1)}},{"./helper/adjacent":15}],41:[function(require,module,exports){var makeString=require("./helper/makeString");var rtrim=require("./rtrim");module.exports=function prune(str,length,pruneStr){str=makeString(str);length=~~length;pruneStr=pruneStr!=null?String(pruneStr):"...";if(str.length<=length)return str;var tmpl=function(c){return c.toUpperCase()!==c.toLowerCase()?"A":" "},template=str.slice(0,length+1).replace(/.(?=\W*\w*$)/g,tmpl);if(template.slice(template.length-2).match(/\w\w/))template=template.replace(/\s*\S+$/,"");else template=rtrim(template.slice(0,template.length-1));return(template+pruneStr).length>str.length?str:str.slice(0,template.length)+pruneStr}},{"./helper/makeString":20,"./rtrim":47}],42:[function(require,module,exports){var surround=require("./surround");module.exports=function quote(str,quoteChar){return surround(str,quoteChar||'"')}},{"./surround":58}],43:[function(require,module,exports){var makeString=require("./helper/makeString");var strRepeat=require("./helper/strRepeat");module.exports=function repeat(str,qty,separator){str=makeString(str);qty=~~qty;if(separator==null)return strRepeat(str,qty);for(var repeat=[];qty>0;repeat[--qty]=str){}return repeat.join(separator)}},{"./helper/makeString":20,"./helper/strRepeat":21}],44:[function(require,module,exports){var makeString=require("./helper/makeString");module.exports=function replaceAll(str,find,replace,ignorecase){var flags=ignorecase===true?"gi":"g";var reg=new RegExp(find,flags);return makeString(str).replace(reg,replace)}},{"./helper/makeString":20}],45:[function(require,module,exports){var chars=require("./chars");module.exports=function reverse(str){return chars(str).reverse().join("")}},{"./chars":3}],46:[function(require,module,exports){var pad=require("./pad");module.exports=function rpad(str,length,padStr){return pad(str,length,padStr,"right")}},{"./pad":39}],47:[function(require,module,exports){var makeString=require("./helper/makeString");var defaultToWhiteSpace=require("./helper/defaultToWhiteSpace");var nativeTrimRight=String.prototype.trimRight;module.exports=function rtrim(str,characters){str=makeString(str);if(!characters&&nativeTrimRight)return nativeTrimRight.call(str);characters=defaultToWhiteSpace(characters);return str.replace(new RegExp(characters+"+$"),"")}},{"./helper/defaultToWhiteSpace":16,"./helper/makeString":20}],48:[function(require,module,exports){var trim=require("./trim");var dasherize=require("./dasherize");var cleanDiacritics=require("./cleanDiacritics");module.exports=function slugify(str){return trim(dasherize(cleanDiacritics(str).replace(/[^\w\s-]/g,"-").toLowerCase()),"-")}},{"./cleanDiacritics":7,"./dasherize":9,"./trim":65}],49:[function(require,module,exports){var chars=require("./chars");module.exports=function splice(str,i,howmany,substr){var arr=chars(str);arr.splice(~~i,~~howmany,substr);return arr.join("")}},{"./chars":3}],50:[function(require,module,exports){var deprecate=require("util-deprecate");module.exports=deprecate(require("sprintf-js").sprintf,"sprintf() will be removed in the next major release, use the sprintf-js package instead.")},{"sprintf-js":36,"util-deprecate":37}],51:[function(require,module,exports){var makeString=require("./helper/makeString");var toPositive=require("./helper/toPositive");module.exports=function startsWith(str,starts,position){str=makeString(str);starts=""+starts;position=position==null?0:Math.min(toPositive(position),str.length);return str.lastIndexOf(starts,position)===position}},{"./helper/makeString":20,"./helper/toPositive":22}],52:[function(require,module,exports){var makeString=require("./helper/makeString");module.exports=function strLeft(str,sep){str=makeString(str);sep=makeString(sep);var pos=!sep?-1:str.indexOf(sep);return~pos?str.slice(0,pos):str}},{"./helper/makeString":20}],53:[function(require,module,exports){var makeString=require("./helper/makeString");module.exports=function strLeftBack(str,sep){str=makeString(str);sep=makeString(sep);var pos=str.lastIndexOf(sep);return~pos?str.slice(0,pos):str}},{"./helper/makeString":20}],54:[function(require,module,exports){var makeString=require("./helper/makeString");module.exports=function strRight(str,sep){str=makeString(str);sep=makeString(sep);var pos=!sep?-1:str.indexOf(sep);return~pos?str.slice(pos+sep.length,str.length):str}},{"./helper/makeString":20}],55:[function(require,module,exports){var makeString=require("./helper/makeString");module.exports=function strRightBack(str,sep){str=makeString(str);sep=makeString(sep);var pos=!sep?-1:str.lastIndexOf(sep);return~pos?str.slice(pos+sep.length,str.length):str}},{"./helper/makeString":20}],56:[function(require,module,exports){var makeString=require("./helper/makeString");module.exports=function stripTags(str){return makeString(str).replace(/<\/?[^>]+>/g,"")}},{"./helper/makeString":20}],57:[function(require,module,exports){var adjacent=require("./helper/adjacent");module.exports=function succ(str){return adjacent(str,1)}},{"./helper/adjacent":15}],58:[function(require,module,exports){module.exports=function surround(str,wrapper){return[wrapper,str,wrapper].join("")}},{}],59:[function(require,module,exports){var makeString=require("./helper/makeString");module.exports=function swapCase(str){return makeString(str).replace(/\S/g,function(c){return c===c.toUpperCase()?c.toLowerCase():c.toUpperCase()})}},{"./helper/makeString":20}],60:[function(require,module,exports){var makeString=require("./helper/makeString");module.exports=function titleize(str){return makeString(str).toLowerCase().replace(/(?:^|\s|-)\S/g,function(c){return c.toUpperCase()})}},{"./helper/makeString":20}],61:[function(require,module,exports){var trim=require("./trim");function boolMatch(s,matchers){var i,matcher,down=s.toLowerCase();matchers=[].concat(matchers);for(i=0;i<matchers.length;i+=1){matcher=matchers[i];if(!matcher)continue;if(matcher.test&&matcher.test(s))return true;if(matcher.toLowerCase()===down)return true}}module.exports=function toBoolean(str,trueValues,falseValues){if(typeof str==="number")str=""+str;if(typeof str!=="string")return!!str;str=trim(str);if(boolMatch(str,trueValues||["true","1"]))return true;if(boolMatch(str,falseValues||["false","0"]))return false}},{"./trim":65}],62:[function(require,module,exports){module.exports=function toNumber(num,precision){if(num==null)return 0;var factor=Math.pow(10,isFinite(precision)?precision:0);return Math.round(num*factor)/factor}},{}],63:[function(require,module,exports){var rtrim=require("./rtrim");module.exports=function toSentence(array,separator,lastSeparator,serial){separator=separator||", ";lastSeparator=lastSeparator||" and ";var a=array.slice(),lastMember=a.pop();if(array.length>2&&serial)lastSeparator=rtrim(separator)+lastSeparator;return a.length?a.join(separator)+lastSeparator+lastMember:lastMember}},{"./rtrim":47}],64:[function(require,module,exports){var toSentence=require("./toSentence");module.exports=function toSentenceSerial(array,sep,lastSep){return toSentence(array,sep,lastSep,true)}},{"./toSentence":63}],65:[function(require,module,exports){var makeString=require("./helper/makeString");var defaultToWhiteSpace=require("./helper/defaultToWhiteSpace");var nativeTrim=String.prototype.trim;module.exports=function trim(str,characters){str=makeString(str);if(!characters&&nativeTrim)return nativeTrim.call(str);characters=defaultToWhiteSpace(characters);return str.replace(new RegExp("^"+characters+"+|"+characters+"+$","g"),"")}},{"./helper/defaultToWhiteSpace":16,"./helper/makeString":20}],66:[function(require,module,exports){var makeString=require("./helper/makeString");module.exports=function truncate(str,length,truncateStr){str=makeString(str);truncateStr=truncateStr||"...";length=~~length;return str.length>length?str.slice(0,length)+truncateStr:str}},{"./helper/makeString":20}],67:[function(require,module,exports){var trim=require("./trim");module.exports=function underscored(str){return trim(str).replace(/([a-z\d])([A-Z]+)/g,"$1_$2").replace(/[-\s]+/g,"_").toLowerCase()}},{"./trim":65}],68:[function(require,module,exports){var makeString=require("./helper/makeString");var htmlEntities=require("./helper/htmlEntities");module.exports=function unescapeHTML(str){return makeString(str).replace(/\&([^;]+);/g,function(entity,entityCode){var match;if(entityCode in htmlEntities){return htmlEntities[entityCode]}else if(match=entityCode.match(/^#x([\da-fA-F]+)$/)){return String.fromCharCode(parseInt(match[1],16))}else if(match=entityCode.match(/^#(\d+)$/)){return String.fromCharCode(~~match[1])}else{return entity}})}},{"./helper/htmlEntities":19,"./helper/makeString":20}],69:[function(require,module,exports){module.exports=function unquote(str,quoteChar){quoteChar=quoteChar||'"';if(str[0]===quoteChar&&str[str.length-1]===quoteChar)return str.slice(1,str.length-1);else return str}},{}],70:[function(require,module,exports){var deprecate=require("util-deprecate");module.exports=deprecate(require("sprintf-js").vsprintf,"vsprintf() will be removed in the next major release, use the sprintf-js package instead.")},{"sprintf-js":36,"util-deprecate":37}],71:[function(require,module,exports){var isBlank=require("./isBlank");var trim=require("./trim");module.exports=function words(str,delimiter){if(isBlank(str))return[];return trim(str,delimiter).split(delimiter||/\s+/)}},{"./isBlank":27,"./trim":65}],72:[function(require,module,exports){var makeString=require("./helper/makeString");module.exports=function wrap(str,options){str=makeString(str);options=options||{};var width=options.width||75;var seperator=options.seperator||"\n";var cut=options.cut||false;var preserveSpaces=options.preserveSpaces||false;var trailingSpaces=options.trailingSpaces||false;var result;if(width<=0){return str}else if(!cut){var words=str.split(" ");var current_column=0;result="";while(words.length>0){if(1+words[0].length+current_column>width){if(current_column>0){if(preserveSpaces){result+=" ";current_column++}else if(trailingSpaces){while(current_column<width){result+=" ";current_column++}}result+=seperator;current_column=0}}if(current_column>0){result+=" ";current_column++}result+=words[0];current_column+=words[0].length;words.shift()}if(trailingSpaces){while(current_column<width){result+=" ";current_column++}}return result}else{var index=0;result="";while(index<str.length){if(index%width==0&&index>0){result+=seperator}result+=str.charAt(index);index++}if(trailingSpaces){while(index%width>0){result+=" ";index++}}return result}}},{"./helper/makeString":20}]},{},[25])(25)}); 68 69_.mixin(s.exports());;
70/* AUTOGENERATED: bootstrap.min.js */
vendor: 39,680 bytes, lines 71-76
71/*! 72 * Bootstrap v3.4.1 (https://getbootstrap.com/) 73 * Copyright 2011-2019 Twitter, Inc. 74 * Licensed under the MIT license 75 */ 76if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(t){"use strict";var e=jQuery.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||3<e[0])throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(),function(n){"use strict";n.fn.emulateTransitionEnd=function(t){var e=!1,i=this;n(this).one("bsTransitionEnd",function(){e=!0});return setTimeout(function(){e||n(i).trigger(n.support.transition.end)},t),this},n(function(){n.support.transition=function o(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(t.style[i]!==undefined)return{end:e[i]};return!1}(),n.support.transition&&(n.event.special.bsTransitionEnd={bindType:n.support.transition.end,delegateType:n.support.transition.end,handle:function(t){if(n(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})})}(jQuery),function(s){"use strict";var e='[data-dismiss="alert"]',a=function(t){s(t).on("click",e,this.close)};a.VERSION="3.4.1",a.TRANSITION_DURATION=150,a.prototype.close=function(t){var e=s(this),i=e.attr("data-target");i||(i=(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),i="#"===i?[]:i;var o=s(document).find(i);function n(){o.detach().trigger("closed.bs.alert").remove()}t&&t.preventDefault(),o.length||(o=e.closest(".alert")),o.trigger(t=s.Event("close.bs.alert")),t.isDefaultPrevented()||(o.removeClass("in"),s.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",n).emulateTransitionEnd(a.TRANSITION_DURATION):n())};var t=s.fn.alert;s.fn.alert=function o(i){return this.each(function(){var t=s(this),e=t.data("bs.alert");e||t.data("bs.alert",e=new a(this)),"string"==typeof i&&e[i].call(t)})},s.fn.alert.Constructor=a,s.fn.alert.noConflict=function(){return s.fn.alert=t,this},s(document).on("click.bs.alert.data-api",e,a.prototype.close)}(jQuery),function(s){"use strict";var n=function(t,e){this.$element=s(t),this.options=s.extend({},n.DEFAULTS,e),this.isLoading=!1};function i(o){return this.each(function(){var t=s(this),e=t.data("bs.button"),i="object"==typeof o&&o;e||t.data("bs.button",e=new n(this,i)),"toggle"==o?e.toggle():o&&e.setState(o)})}n.VERSION="3.4.1",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(t){var e="disabled",i=this.$element,o=i.is("input")?"val":"html",n=i.data();t+="Text",null==n.resetText&&i.data("resetText",i[o]()),setTimeout(s.proxy(function(){i[o](null==n[t]?this.options[t]:n[t]),"loadingText"==t?(this.isLoading=!0,i.addClass(e).attr(e,e).prop(e,!0)):this.isLoading&&(this.isLoading=!1,i.removeClass(e).removeAttr(e).prop(e,!1))},this),0)},n.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")?(i.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==i.prop("type")&&(i.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),i.prop("checked",this.$element.hasClass("active")),t&&i.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var t=s.fn.button;s.fn.button=i,s.fn.button.Constructor=n,s.fn.button.noConflict=function(){return s.fn.button=t,this},s(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(t){var e=s(t.target).closest(".btn");i.call(e,"toggle"),s(t.target).is('input[type="radio"], input[type="checkbox"]')||(t.preventDefault(),e.is("input,button")?e.trigger("focus"):e.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(t){s(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))})}(jQuery),function(p){"use strict";var c=function(t,e){this.$element=p(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=e,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",p.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",p.proxy(this.pause,this)).on("mouseleave.bs.carousel",p.proxy(this.cycle,this))};function r(n){return this.each(function(){var t=p(this),e=t.data("bs.carousel"),i=p.extend({},c.DEFAULTS,t.data(),"object"==typeof n&&n),o="string"==typeof n?n:i.slide;e||t.data("bs.carousel",e=new c(this,i)),"number"==typeof n?e.to(n):o?e[o]():i.interval&&e.pause().cycle()})}c.VERSION="3.4.1",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},c.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(p.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},c.prototype.getItemForDirection=function(t,e){var i=this.getItemIndex(e);if(("prev"==t&&0===i||"next"==t&&i==this.$items.length-1)&&!this.options.wrap)return e;var o=(i+("prev"==t?-1:1))%this.$items.length;return this.$items.eq(o)},c.prototype.to=function(t){var e=this,i=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):i==t?this.pause().cycle():this.slide(i<t?"next":"prev",this.$items.eq(t))},c.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&p.support.transition&&(this.$element.trigger(p.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){if(!this.sliding)return this.slide("next")},c.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},c.prototype.slide=function(t,e){var i=this.$element.find(".item.active"),o=e||this.getItemForDirection(t,i),n=this.interval,s="next"==t?"left":"right",a=this;if(o.hasClass("active"))return this.sliding=!1;var r=o[0],l=p.Event("slide.bs.carousel",{relatedTarget:r,direction:s});if(this.$element.trigger(l),!l.isDefaultPrevented()){if(this.sliding=!0,n&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var h=p(this.$indicators.children()[this.getItemIndex(o)]);h&&h.addClass("active")}var d=p.Event("slid.bs.carousel",{relatedTarget:r,direction:s});return p.support.transition&&this.$element.hasClass("slide")?(o.addClass(t),"object"==typeof o&&o.length&&o[0].offsetWidth,i.addClass(s),o.addClass(s),i.one("bsTransitionEnd",function(){o.removeClass([t,s].join(" ")).addClass("active"),i.removeClass(["active",s].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger(d)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(i.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(d)),n&&this.cycle(),this}};var t=p.fn.carousel;p.fn.carousel=r,p.fn.carousel.Constructor=c,p.fn.carousel.noConflict=function(){return p.fn.carousel=t,this};var e=function(t){var e=p(this),i=e.attr("href");i&&(i=i.replace(/.*(?=#[^\s]+$)/,""));var o=e.attr("data-target")||i,n=p(document).find(o);if(n.hasClass("carousel")){var s=p.extend({},n.data(),e.data()),a=e.attr("data-slide-to");a&&(s.interval=!1),r.call(n,s),a&&n.data("bs.carousel").to(a),t.preventDefault()}};p(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),p(window).on("load",function(){p('[data-ride="carousel"]').each(function(){var t=p(this);r.call(t,t.data())})})}(jQuery),function(a){"use strict";var r=function(t,e){this.$element=a(t),this.options=a.extend({},r.DEFAULTS,e),this.$trigger=a('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};function n(t){var e,i=t.attr("data-target")||(e=t.attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"");return a(document).find(i)}function l(o){return this.each(function(){var t=a(this),e=t.data("bs.collapse"),i=a.extend({},r.DEFAULTS,t.data(),"object"==typeof o&&o);!e&&i.toggle&&/show|hide/.test(o)&&(i.toggle=!1),e||t.data("bs.collapse",e=new r(this,i)),"string"==typeof o&&e[o]()})}r.VERSION="3.4.1",r.TRANSITION_DURATION=350,r.DEFAULTS={toggle:!0},r.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},r.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var t,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(t=e.data("bs.collapse"))&&t.transitioning)){var i=a.Event("show.bs.collapse");if(this.$element.trigger(i),!i.isDefaultPrevented()){e&&e.length&&(l.call(e,"hide"),t||e.data("bs.collapse",null));var o=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[o](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var n=function(){this.$element.removeClass("collapsing").addClass("collapse in")[o](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return n.call(this);var s=a.camelCase(["scroll",o].join("-"));this.$element.one("bsTransitionEnd",a.proxy(n,this)).emulateTransitionEnd(r.TRANSITION_DURATION)[o](this.$element[0][s])}}}},r.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var t=a.Event("hide.bs.collapse");if(this.$element.trigger(t),!t.isDefaultPrevented()){var e=this.dimension();this.$element[e](this.$element[e]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var i=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!a.support.transition)return i.call(this);this.$element[e](0).one("bsTransitionEnd",a.proxy(i,this)).emulateTransitionEnd(r.TRANSITION_DURATION)}}},r.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},r.prototype.getParent=function(){return a(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(t,e){var i=a(e);this.addAriaAndCollapsedClass(n(i),i)},this)).end()},r.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)};var t=a.fn.collapse;a.fn.collapse=l,a.fn.collapse.Constructor=r,a.fn.collapse.noConflict=function(){return a.fn.collapse=t,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(t){var e=a(this);e.attr("data-target")||t.preventDefault();var i=n(e),o=i.data("bs.collapse")?"toggle":e.data();l.call(i,o)})}(jQuery),function(a){"use strict";var r='[data-toggle="dropdown"]',o=function(t){a(t).on("click.bs.dropdown",this.toggle)};function l(t){var e=t.attr("data-target");e||(e=(e=t.attr("href"))&&/#[A-Za-z]/.test(e)&&e.replace(/.*(?=#[^\s]*$)/,""));var i="#"!==e?a(document).find(e):null;return i&&i.length?i:t.parent()}function s(o){o&&3===o.which||(a(".dropdown-backdrop").remove(),a(r).each(function(){var t=a(this),e=l(t),i={relatedTarget:this};e.hasClass("open")&&(o&&"click"==o.type&&/input|textarea/i.test(o.target.tagName)&&a.contains(e[0],o.target)||(e.trigger(o=a.Event("hide.bs.dropdown",i)),o.isDefaultPrevented()||(t.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",i)))))}))}o.VERSION="3.4.1",o.prototype.toggle=function(t){var e=a(this);if(!e.is(".disabled, :disabled")){var i=l(e),o=i.hasClass("open");if(s(),!o){"ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",s);var n={relatedTarget:this};if(i.trigger(t=a.Event("show.bs.dropdown",n)),t.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),i.toggleClass("open").trigger(a.Event("shown.bs.dropdown",n))}return!1}},o.prototype.keydown=function(t){if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)){var e=a(this);if(t.preventDefault(),t.stopPropagation(),!e.is(".disabled, :disabled")){var i=l(e),o=i.hasClass("open");if(!o&&27!=t.which||o&&27==t.which)return 27==t.which&&i.find(r).trigger("focus"),e.trigger("click");var n=i.find(".dropdown-menu li:not(.disabled):visible a");if(n.length){var s=n.index(t.target);38==t.which&&0<s&&s--,40==t.which&&s<n.length-1&&s++,~s||(s=0),n.eq(s).trigger("focus")}}}};var t=a.fn.dropdown;a.fn.dropdown=function e(i){return this.each(function(){var t=a(this),e=t.data("bs.dropdown");e||t.data("bs.dropdown",e=new o(this)),"string"==typeof i&&e[i].call(t)})},a.fn.dropdown.Constructor=o,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=t,this},a(document).on("click.bs.dropdown.data-api",s).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",r,o.prototype.toggle).on("keydown.bs.dropdown.data-api",r,o.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",o.prototype.keydown)}(jQuery),function(a){"use strict";var s=function(t,e){this.options=e,this.$body=a(document.body),this.$element=a(t),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.fixedContent=".navbar-fixed-top, .navbar-fixed-bottom",this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};function r(o,n){return this.each(function(){var t=a(this),e=t.data("bs.modal"),i=a.extend({},s.DEFAULTS,t.data(),"object"==typeof o&&o);e||t.data("bs.modal",e=new s(this,i)),"string"==typeof o?e[o](n):i.show&&e.show(n)})}s.VERSION="3.4.1",s.TRANSITION_DURATION=300,s.BACKDROP_TRANSITION_DURATION=150,s.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},s.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},s.prototype.show=function(i){var o=this,t=a.Event("show.bs.modal",{relatedTarget:i});this.$element.trigger(t),this.isShown||t.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){o.$element.one("mouseup.dismiss.bs.modal",function(t){a(t.target).is(o.$element)&&(o.ignoreBackdropClick=!0)})}),this.backdrop(function(){var t=a.support.transition&&o.$element.hasClass("fade");o.$element.parent().length||o.$element.appendTo(o.$body),o.$element.show().scrollTop(0),o.adjustDialog(),t&&o.$element[0].offsetWidth,o.$element.addClass("in"),o.enforceFocus();var e=a.Event("shown.bs.modal",{relatedTarget:i});t?o.$dialog.one("bsTransitionEnd",function(){o.$element.trigger("focus").trigger(e)}).emulateTransitionEnd(s.TRANSITION_DURATION):o.$element.trigger("focus").trigger(e)}))},s.prototype.hide=function(t){t&&t.preventDefault(),t=a.Event("hide.bs.modal"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(s.TRANSITION_DURATION):this.hideModal())},s.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(t){document===t.target||this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},s.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},s.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},s.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")})},s.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},s.prototype.backdrop=function(t){var e=this,i=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var o=a.support.transition&&i;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+i).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(t){this.ignoreBackdropClick?this.ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide())},this)),o&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;o?this.$backdrop.one("bsTransitionEnd",t).emulateTransitionEnd(s.BACKDROP_TRANSITION_DURATION):t()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var n=function(){e.removeBackdrop(),t&&t()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",n).emulateTransitionEnd(s.BACKDROP_TRANSITION_DURATION):n()}else t&&t()},s.prototype.handleUpdate=function(){this.adjustDialog()},s.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},s.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},s.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth<t,this.scrollbarWidth=this.measureScrollbar()},s.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"";var n=this.scrollbarWidth;this.bodyIsOverflowing&&(this.$body.css("padding-right",t+n),a(this.fixedContent).each(function(t,e){var i=e.style.paddingRight,o=a(e).css("padding-right");a(e).data("padding-right",i).css("padding-right",parseFloat(o)+n+"px")}))},s.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad),a(this.fixedContent).each(function(t,e){var i=a(e).data("padding-right");a(e).removeData("padding-right"),e.style.paddingRight=i||""})},s.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var t=a.fn.modal;a.fn.modal=r,a.fn.modal.Constructor=s,a.fn.modal.noConflict=function(){return a.fn.modal=t,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var e=a(this),i=e.attr("href"),o=e.attr("data-target")||i&&i.replace(/.*(?=#[^\s]+$)/,""),n=a(document).find(o),s=n.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(i)&&i},n.data(),e.data());e.is("a")&&t.preventDefault(),n.one("show.bs.modal",function(t){t.isDefaultPrevented()||n.one("hidden.bs.modal",function(){e.is(":visible")&&e.trigger("focus")})}),r.call(n,s,this)})}(jQuery),function(g){"use strict";var o=["sanitize","whiteList","sanitizeFn"],a=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],t={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},r=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,l=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function u(t,e){var i=t.nodeName.toLowerCase();if(-1!==g.inArray(i,e))return-1===g.inArray(i,a)||Boolean(t.nodeValue.match(r)||t.nodeValue.match(l));for(var o=g(e).filter(function(t,e){return e instanceof RegExp}),n=0,s=o.length;n<s;n++)if(i.match(o[n]))return!0;return!1}function n(t,e,i){if(0===t.length)return t;if(i&&"function"==typeof i)return i(t);if(!document.implementation||!document.implementation.createHTMLDocument)return t;var o=document.implementation.createHTMLDocument("sanitization");o.body.innerHTML=t;for(var n=g.map(e,function(t,e){return e}),s=g(o.body).find("*"),a=0,r=s.length;a<r;a++){var l=s[a],h=l.nodeName.toLowerCase();if(-1!==g.inArray(h,n))for(var d=g.map(l.attributes,function(t){return t}),p=[].concat(e["*"]||[],e[h]||[]),c=0,f=d.length;c<f;c++)u(d[c],p)||l.removeAttribute(d[c].nodeName);else l.parentNode.removeChild(l)}return o.body.innerHTML}var m=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)};m.VERSION="3.4.1",m.TRANSITION_DURATION=150,m.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:t},m.prototype.init=function(t,e,i){if(this.enabled=!0,this.type=t,this.$element=g(e),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&g(document).find(g.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var o=this.options.trigger.split(" "),n=o.length;n--;){var s=o[n];if("click"==s)this.$element.on("click."+this.type,this.options.selector,g.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",r="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,g.proxy(this.enter,this)),this.$element.on(r+"."+this.type,this.options.selector,g.proxy(this.leave,this))}}this.options.selector?this._options=g.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},m.prototype.getDefaults=function(){return m.DEFAULTS},m.prototype.getOptions=function(t){var e=this.$element.data();for(var i in e)e.hasOwnProperty(i)&&-1!==g.inArray(i,o)&&delete e[i];return(t=g.extend({},this.getDefaults(),e,t)).delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t.sanitize&&(t.template=n(t.template,t.whiteList,t.sanitizeFn)),t},m.prototype.getDelegateOptions=function(){var i={},o=this.getDefaults();return this._options&&g.each(this._options,function(t,e){o[t]!=e&&(i[t]=e)}),i},m.prototype.enter=function(t){var e=t instanceof this.constructor?t:g(t.currentTarget).data("bs."+this.type);if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e)),t instanceof g.Event&&(e.inState["focusin"==t.type?"focus":"hover"]=!0),e.tip().hasClass("in")||"in"==e.hoverState)e.hoverState="in";else{if(clearTimeout(e.timeout),e.hoverState="in",!e.options.delay||!e.options.delay.show)return e.show();e.timeout=setTimeout(function(){"in"==e.hoverState&&e.show()},e.options.delay.show)}},m.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},m.prototype.leave=function(t){var e=t instanceof this.constructor?t:g(t.currentTarget).data("bs."+this.type);if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e)),t instanceof g.Event&&(e.inState["focusout"==t.type?"focus":"hover"]=!1),!e.isInStateTrue()){if(clearTimeout(e.timeout),e.hoverState="out",!e.options.delay||!e.options.delay.hide)return e.hide();e.timeout=setTimeout(function(){"out"==e.hoverState&&e.hide()},e.options.delay.hide)}},m.prototype.show=function(){var t=g.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var e=g.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!e)return;var i=this,o=this.tip(),n=this.getUID(this.type);this.setContent(),o.attr("id",n),this.$element.attr("aria-describedby",n),this.options.animation&&o.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,r=a.test(s);r&&(s=s.replace(a,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?o.appendTo(g(document).find(this.options.container)):o.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var l=this.getPosition(),h=o[0].offsetWidth,d=o[0].offsetHeight;if(r){var p=s,c=this.getPosition(this.$viewport);s="bottom"==s&&l.bottom+d>c.bottom?"top":"top"==s&&l.top-d<c.top?"bottom":"right"==s&&l.right+h>c.width?"left":"left"==s&&l.left-h<c.left?"right":s,o.removeClass(p).addClass(s)}var f=this.getCalculatedOffset(s,l,h,d);this.applyPlacement(f,s);var u=function(){var t=i.hoverState;i.$element.trigger("shown.bs."+i.type),i.hoverState=null,"out"==t&&i.leave(i)};g.support.transition&&this.$tip.hasClass("fade")?o.one("bsTransitionEnd",u).emulateTransitionEnd(m.TRANSITION_DURATION):u()}},m.prototype.applyPlacement=function(t,e){var i=this.tip(),o=i[0].offsetWidth,n=i[0].offsetHeight,s=parseInt(i.css("margin-top"),10),a=parseInt(i.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(a)&&(a=0),t.top+=s,t.left+=a,g.offset.setOffset(i[0],g.extend({using:function(t){i.css({top:Math.round(t.top),left:Math.round(t.left)})}},t),0),i.addClass("in");var r=i[0].offsetWidth,l=i[0].offsetHeight;"top"==e&&l!=n&&(t.top=t.top+n-l);var h=this.getViewportAdjustedDelta(e,t,r,l);h.left?t.left+=h.left:t.top+=h.top;var d=/top|bottom/.test(e),p=d?2*h.left-o+r:2*h.top-n+l,c=d?"offsetWidth":"offsetHeight";i.offset(t),this.replaceArrow(p,i[0][c],d)},m.prototype.replaceArrow=function(t,e,i){this.arrow().css(i?"left":"top",50*(1-t/e)+"%").css(i?"top":"left","")},m.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();this.options.html?(this.options.sanitize&&(e=n(e,this.options.whiteList,this.options.sanitizeFn)),t.find(".tooltip-inner").html(e)):t.find(".tooltip-inner").text(e),t.removeClass("fade in top bottom left right")},m.prototype.hide=function(t){var e=this,i=g(this.$tip),o=g.Event("hide.bs."+this.type);function n(){"in"!=e.hoverState&&i.detach(),e.$element&&e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),t&&t()}if(this.$element.trigger(o),!o.isDefaultPrevented())return i.removeClass("in"),g.support.transition&&i.hasClass("fade")?i.one("bsTransitionEnd",n).emulateTransitionEnd(m.TRANSITION_DURATION):n(),this.hoverState=null,this},m.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},m.prototype.hasContent=function(){return this.getTitle()},m.prototype.getPosition=function(t){var e=(t=t||this.$element)[0],i="BODY"==e.tagName,o=e.getBoundingClientRect();null==o.width&&(o=g.extend({},o,{width:o.right-o.left,height:o.bottom-o.top}));var n=window.SVGElement&&e instanceof window.SVGElement,s=i?{top:0,left:0}:n?null:t.offset(),a={scroll:i?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},r=i?{width:g(window).width(),height:g(window).height()}:null;return g.extend({},o,a,r,s)},m.prototype.getCalculatedOffset=function(t,e,i,o){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-i/2}:"top"==t?{top:e.top-o,left:e.left+e.width/2-i/2}:"left"==t?{top:e.top+e.height/2-o/2,left:e.left-i}:{top:e.top+e.height/2-o/2,left:e.left+e.width}},m.prototype.getViewportAdjustedDelta=function(t,e,i,o){var n={top:0,left:0};if(!this.$viewport)return n;var s=this.options.viewport&&this.options.viewport.padding||0,a=this.getPosition(this.$viewport);if(/right|left/.test(t)){var r=e.top-s-a.scroll,l=e.top+s-a.scroll+o;r<a.top?n.top=a.top-r:l>a.top+a.height&&(n.top=a.top+a.height-l)}else{var h=e.left-s,d=e.left+s+i;h<a.left?n.left=a.left-h:d>a.right&&(n.left=a.left+a.width-d)}return n},m.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},m.prototype.getUID=function(t){for(;t+=~~(1e6*Math.random()),document.getElementById(t););return t},m.prototype.tip=function(){if(!this.$tip&&(this.$tip=g(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},m.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},m.prototype.enable=function(){this.enabled=!0},m.prototype.disable=function(){this.enabled=!1},m.prototype.toggleEnabled=function(){this.enabled=!this.enabled},m.prototype.toggle=function(t){var e=this;t&&((e=g(t.currentTarget).data("bs."+this.type))||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e))),t?(e.inState.click=!e.inState.click,e.isInStateTrue()?e.enter(e):e.leave(e)):e.tip().hasClass("in")?e.leave(e):e.enter(e)},m.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})},m.prototype.sanitizeHtml=function(t){return n(t,this.options.whiteList,this.options.sanitizeFn)};var e=g.fn.tooltip;g.fn.tooltip=function i(o){return this.each(function(){var t=g(this),e=t.data("bs.tooltip"),i="object"==typeof o&&o;!e&&/destroy|hide/.test(o)||(e||t.data("bs.tooltip",e=new m(this,i)),"string"==typeof o&&e[o]())})},g.fn.tooltip.Constructor=m,g.fn.tooltip.noConflict=function(){return g.fn.tooltip=e,this}}(jQuery),function(n){"use strict";var s=function(t,e){this.init("popover",t,e)};if(!n.fn.tooltip)throw new Error("Popover requires tooltip.js");s.VERSION="3.4.1",s.DEFAULTS=n.extend({},n.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),((s.prototype=n.extend({},n.fn.tooltip.Constructor.prototype)).constructor=s).prototype.getDefaults=function(){return s.DEFAULTS},s.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();if(this.options.html){var o=typeof i;this.options.sanitize&&(e=this.sanitizeHtml(e),"string"===o&&(i=this.sanitizeHtml(i))),t.find(".popover-title").html(e),t.find(".popover-content").children().detach().end()["string"===o?"html":"append"](i)}else t.find(".popover-title").text(e),t.find(".popover-content").children().detach().end().text(i);t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},s.prototype.hasContent=function(){return this.getTitle()||this.getContent()},s.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},s.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var t=n.fn.popover;n.fn.popover=function e(o){return this.each(function(){var t=n(this),e=t.data("bs.popover"),i="object"==typeof o&&o;!e&&/destroy|hide/.test(o)||(e||t.data("bs.popover",e=new s(this,i)),"string"==typeof o&&e[o]())})},n.fn.popover.Constructor=s,n.fn.popover.noConflict=function(){return n.fn.popover=t,this}}(jQuery),function(s){"use strict";function n(t,e){this.$body=s(document.body),this.$scrollElement=s(t).is(document.body)?s(window):s(t),this.options=s.extend({},n.DEFAULTS,e),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",s.proxy(this.process,this)),this.refresh(),this.process()}function e(o){return this.each(function(){var t=s(this),e=t.data("bs.scrollspy"),i="object"==typeof o&&o;e||t.data("bs.scrollspy",e=new n(this,i)),"string"==typeof o&&e[o]()})}n.VERSION="3.4.1",n.DEFAULTS={offset:10},n.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},n.prototype.refresh=function(){var t=this,o="offset",n=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),s.isWindow(this.$scrollElement[0])||(o="position",n=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var t=s(this),e=t.data("target")||t.attr("href"),i=/^#./.test(e)&&s(e);return i&&i.length&&i.is(":visible")&&[[i[o]().top+n,e]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},n.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.getScrollHeight(),o=this.options.offset+i-this.$scrollElement.height(),n=this.offsets,s=this.targets,a=this.activeTarget;if(this.scrollHeight!=i&&this.refresh(),o<=e)return a!=(t=s[s.length-1])&&this.activate(t);if(a&&e<n[0])return this.activeTarget=null,this.clear();for(t=n.length;t--;)a!=s[t]&&e>=n[t]&&(n[t+1]===undefined||e<n[t+1])&&this.activate(s[t])},n.prototype.activate=function(t){this.activeTarget=t,this.clear();var e=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',i=s(e).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active")),i.trigger("activate.bs.scrollspy")},n.prototype.clear=function(){s(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var t=s.fn.scrollspy;s.fn.scrollspy=e,s.fn.scrollspy.Constructor=n,s.fn.scrollspy.noConflict=function(){return s.fn.scrollspy=t,this},s(window).on("load.bs.scrollspy.data-api",function(){s('[data-spy="scroll"]').each(function(){var t=s(this);e.call(t,t.data())})})}(jQuery),function(r){"use strict";var a=function(t){this.element=r(t)};function e(i){return this.each(function(){var t=r(this),e=t.data("bs.tab");e||t.data("bs.tab",e=new a(this)),"string"==typeof i&&e[i]()})}a.VERSION="3.4.1",a.TRANSITION_DURATION=150,a.prototype.show=function(){var t=this.element,e=t.closest("ul:not(.dropdown-menu)"),i=t.data("target");if(i||(i=(i=t.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var o=e.find(".active:last a"),n=r.Event("hide.bs.tab",{relatedTarget:t[0]}),s=r.Event("show.bs.tab",{relatedTarget:o[0]});if(o.trigger(n),t.trigger(s),!s.isDefaultPrevented()&&!n.isDefaultPrevented()){var a=r(document).find(i);this.activate(t.closest("li"),e),this.activate(a,a.parent(),function(){o.trigger({type:"hidden.bs.tab",relatedTarget:t[0]}),t.trigger({type:"shown.bs.tab",relatedTarget:o[0]})})}}},a.prototype.activate=function(t,e,i){var o=e.find("> .active"),n=i&&r.support.transition&&(o.length&&o.hasClass("fade")||!!e.find("> .fade").length);function s(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),t.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),n?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu").length&&t.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),i&&i()}o.length&&n?o.one("bsTransitionEnd",s).emulateTransitionEnd(a.TRANSITION_DURATION):s(),o.removeClass("in")};var t=r.fn.tab;r.fn.tab=e,r.fn.tab.Constructor=a,r.fn.tab.noConflict=function(){return r.fn.tab=t,this};var i=function(t){t.preventDefault(),e.call(r(this),"show")};r(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery),function(l){"use strict";var h=function(t,e){this.options=l.extend({},h.DEFAULTS,e);var i=this.options.target===h.DEFAULTS.target?l(this.options.target):l(document).find(this.options.target);this.$target=i.on("scroll.bs.affix.data-api",l.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",l.proxy(this.checkPositionWithEventLoop,this)),this.$element=l(t),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function i(o){return this.each(function(){var t=l(this),e=t.data("bs.affix"),i="object"==typeof o&&o;e||t.data("bs.affix",e=new h(this,i)),"string"==typeof o&&e[o]()})}h.VERSION="3.4.1",h.RESET="affix affix-top affix-bottom",h.DEFAULTS={offset:0,target:window},h.prototype.getState=function(t,e,i,o){var n=this.$target.scrollTop(),s=this.$element.offset(),a=this.$target.height();if(null!=i&&"top"==this.affixed)return n<i&&"top";if("bottom"==this.affixed)return null!=i?!(n+this.unpin<=s.top)&&"bottom":!(n+a<=t-o)&&"bottom";var r=null==this.affixed,l=r?n:s.top;return null!=i&&n<=i?"top":null!=o&&t-o<=l+(r?a:e)&&"bottom"},h.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(h.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},h.prototype.checkPositionWithEventLoop=function(){setTimeout(l.proxy(this.checkPosition,this),1)},h.prototype.checkPosition=function(){if(this.$element.is(":visible")){var t=this.$element.height(),e=this.options.offset,i=e.top,o=e.bottom,n=Math.max(l(document).height(),l(document.body).height());"object"!=typeof e&&(o=i=e),"function"==typeof i&&(i=e.top(this.$element)),"function"==typeof o&&(o=e.bottom(this.$element));var s=this.getState(n,t,i,o);if(this.affixed!=s){null!=this.unpin&&this.$element.css("top","");var a="affix"+(s?"-"+s:""),r=l.Event(a+".bs.affix");if(this.$element.trigger(r),r.isDefaultPrevented())return;this.affixed=s,this.unpin="bottom"==s?this.getPinnedOffset():null,this.$element.removeClass(h.RESET).addClass(a).trigger(a.replace("affix","affixed")+".bs.affix")}"bottom"==s&&this.$element.offset({top:n-t-o})}};var t=l.fn.affix;l.fn.affix=i,l.fn.affix.Constructor=h,l.fn.affix.noConflict=function(){return l.fn.affix=t,this},l(window).on("load",function(){l('[data-spy="affix"]').each(function(){var t=l(this),e=t.data();e.offset=e.offset||{},null!=e.offsetBottom&&(e.offset.bottom=e.offsetBottom),null!=e.offsetTop&&(e.offset.top=e.offsetTop),i.call(t,e)})})}(jQuery);
76; 77/* AUTOGENERATED: hash.js */ 78(function(a,b){"use strict";var c=function(){var b=function(){var b=a.location.hash?a.location.hash.substr(1).split("&"):[],c={};for(var d=0;d<b.length;d++){var e=b[d].split("=");c[e[0]]=decodeURIComponent(e[1])}return c};var c=function(b){var c=[];for(var d in b){c.push(d+"="+encodeURIComponent(b[d]))}a.location.hash=c.join("&")};return{get:function(a){var c=b();if(a){return c[a]}else{return c}},add:function(a){var d=b();for(var e in a){d[e]=a[e]}c(d)},remove:function(a){a=typeof a=="string"?[a]:a;var d=b();for(var e=0;e<a.length;e++){delete d[a[e]]}c(d)},clear:function(){c({})}}}();a.hash=c})(window);; 79/* AUTOGENERATED: object_hash.js */ 80!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.objectHash=e()}}(function(){return function e(t,r,n){function o(u,a){if(!r[u]){if(!t[u]){var s="function"==typeof require&&require;if(!a&&s)return s(u,!0);if(i)return i(u,!0);throw new Error("Cannot find module '"+u+"'")}var f=r[u]={exports:{}};t[u][0].call(f.exports,function(e){var r=t[u][1][e];return o(r?r:e)},f,f.exports,e,t,r,n)}return r[u].exports}for(var i="function"==typeof require&&require,u=0;u<n.length;u++)o(n[u]);return o}({1:[function(e,t,r){(function(n,o,i,u,a,s,f,c,l){"use strict";function d(e,t){return t=h(e,t),g(e,t)}function h(e,t){var r=m.getHashes?m.getHashes():["sha1","md5"],n=["buffer","hex","binary","base64"];if(t=t||{},t.algorithm=t.algorithm||"sha1",t.encoding=t.encoding||"hex",t.excludeValues=t.excludeValues?!0:!1,t.algorithm=t.algorithm.toLowerCase(),t.encoding=t.encoding.toLowerCase(),t.ignoreUnknown=t.ignoreUnknown!==!0?!1:!0,t.respectType=t.respectType===!1?!1:!0,t.respectFunctionNames=t.respectFunctionNames===!1?!1:!0,t.respectFunctionProperties=t.respectFunctionProperties===!1?!1:!0,t.unorderedArrays=t.unorderedArrays!==!0?!1:!0,t.unorderedSets=t.unorderedSets===!1?!1:!0,t.replacer=t.replacer||void 0,"undefined"==typeof e)throw new Error("Object argument required.");r.push("passthrough");for(var o=0;o<r.length;++o)r[o].toLowerCase()===t.algorithm.toLowerCase()&&(t.algorithm=r[o]);if(-1===r.indexOf(t.algorithm))throw new Error('Algorithm "'+t.algorithm+'" not supported. supported values: '+r.join(", "));if(-1===n.indexOf(t.encoding)&&"passthrough"!==t.algorithm)throw new Error('Encoding "'+t.encoding+'" not supported. supported values: '+n.join(", "));return t}function p(e){if("function"!=typeof e)return!1;var t=/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i;return null!=t.exec(Function.prototype.toString.call(e))}function g(e,t){var r;r="passthrough"!==t.algorithm?m.createHash(t.algorithm):new y,"undefined"==typeof r.write&&(r.write=r.update,r.end=r.update);var n=w(t,r);if(n.dispatch(e),r.end(""),"undefined"==typeof r.read&&"function"==typeof r.digest)return r.digest("buffer"===t.encoding?void 0:t.encoding);var o=r.read();return"buffer"===t.encoding?o:o.toString(t.encoding)}function w(e,t,r){return r=r||[],{dispatch:function(t){e.replacer&&(t=e.replacer(t));var r=typeof t;return null===t&&(r="null"),this["_"+r](t)},_object:function(n){var o=/\[object (.*)\]/i,u=Object.prototype.toString.call(n),a=o.exec(u);a=a?a[1]:"unknown:["+u+"]",a=a.toLowerCase();var s=null;if((s=r.indexOf(n))>=0)return this.dispatch("[CIRCULAR:"+s+"]");if(r.push(n),"undefined"!=typeof i&&i.isBuffer&&i.isBuffer(n))return t.write("buffer:"),t.write(n);if("object"===a||"function"===a){var f=Object.keys(n).sort();e.respectType===!1||p(n)||f.splice(0,0,"prototype","__proto__","constructor"),t.write("object:"+f.length+":");var c=this;return f.forEach(function(r){c.dispatch(r),t.write(":"),e.excludeValues||c.dispatch(n[r]),t.write(",")})}if(!this["_"+a]){if(e.ignoreUnknown)return t.write("["+a+"]");throw new Error('Unknown object type "'+a+'"')}this["_"+a](n)},_array:function(n,o){o="undefined"!=typeof o?o:e.unorderedArrays!==!1;var i=this;if(t.write("array:"+n.length+":"),!o||n.length<=1)return n.forEach(function(e){return i.dispatch(e)});var u=[],a=n.map(function(t){var n=new y,o=r.slice(),i=w(e,n,o);return i.dispatch(t),u=u.concat(o.slice(r.length)),n.read().toString()});return r=r.concat(u),a.sort(),this._array(a,!1)},_date:function(e){return t.write("date:"+e.toJSON())},_symbol:function(e){return t.write("symbol:"+e.toString(),"utf8")},_error:function(e){return t.write("error:"+e.toString(),"utf8")},_boolean:function(e){return t.write("bool:"+e.toString())}
80,_string:function(e){t.write("string:"+e.length+":"),t.write(e,"utf8")},_function:function(r){t.write("fn:"),p(r)?this.dispatch("[native]"):this.dispatch(r.toString()),e.respectFunctionNames!==!1&&this.dispatch("function-name:"+String(r.name)),e.respectFunctionProperties&&this._object(r)},_number:function(e){return t.write("number:"+e.toString())},_xml:function(e){return t.write("xml:"+e.toString(),"utf8")},_null:function(){return t.write("Null")},_undefined:function(){return t.write("Undefined")},_regexp:function(e){return t.write("regex:"+e.toString(),"utf8")},_uint8array:function(e){return t.write("uint8array:"),this.dispatch(Array.prototype.slice.call(e))},_uint8clampedarray:function(e){return t.write("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(e))},_int8array:function(e){return t.write("uint8array:"),this.dispatch(Array.prototype.slice.call(e))},_uint16array:function(e){return t.write("uint16array:"),this.dispatch(Array.prototype.slice.call(e))},_int16array:function(e){return t.write("uint16array:"),this.dispatch(Array.prototype.slice.call(e))},_uint32array:function(e){return t.write("uint32array:"),this.dispatch(Array.prototype.slice.call(e))},_int32array:function(e){return t.write("uint32array:"),this.dispatch(Array.prototype.slice.call(e))},_float32array:function(e){return t.write("float32array:"),this.dispatch(Array.prototype.slice.call(e))},_float64array:function(e){return t.write("float64array:"),this.dispatch(Array.prototype.slice.call(e))},_arraybuffer:function(e){return t.write("arraybuffer:"),this.dispatch(new Uint8Array(e))},_url:function(e){return t.write("url:"+e.toString(),"utf8")},_map:function(r){t.write("map:");var n=Array.from(r);return this._array(n,e.unorderedSets!==!1)},_set:function(r){t.write("set:");var n=Array.from(r);return this._array(n,e.unorderedSets!==!1)},_blob:function(){if(e.ignoreUnknown)return t.write("[blob]");throw Error('Hashing Blob objects is currently not supported\n(see https://github.com/puleos/object-hash/issues/26)\nUse "options.replacer" or "options.ignoreUnknown"\n')},_domwindow:function(){return t.write("domwindow")},_process:function(){return t.write("process")},_timer:function(){return t.write("timer")},_pipe:function(){return t.write("pipe")},_tcp:function(){return t.write("tcp")},_udp:function(){return t.write("udp")},_tty:function(){return t.write("tty")},_statwatcher:function(){return t.write("statwatcher")},_securecontext:function(){return t.write("securecontext")},_connection:function(){return t.write("connection")},_zlib:function(){return t.write("zlib")},_context:function(){return t.write("context")},_nodescript:function(){return t.write("nodescript")},_httpparser:function(){return t.write("httpparser")},_dataview:function(){return t.write("dataview")},_signal:function(){return t.write("signal")},_fsevent:function(){return t.write("fsevent")},_tlswrap:function(){return t.write("tlswrap")}}}function y(){return{buf:"",write:function(e){this.buf+=e},end:function(e){this.buf+=e},read:function(){return this.buf}}}var m=e("crypto");r=t.exports=d,r.sha1=function(e){return d(e)},r.keys=function(e){return d(e,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},r.MD5=function(e){return d(e,{algorithm:"md5",encoding:"hex"})},r.keysMD5=function(e){return d(e,{algorithm:"md5",encoding:"hex",excludeValues:!0})},r.writeToStream=function(e,t,r){return"undefined"==typeof r&&(r=t,t={}),t=h(e,t),w(t,r).dispatch(e)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_50da2638.js","/")},{buffer:3,crypto:5,lYpoI2:10}],2:[function(e,t,r){(function(e,t,n,o,i,u,a,s,f){var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(e){"use strict";function t(e){var t=e.charCodeAt(0);return t===i||t===l?62:t===u||t===d?63:a>t?-1:a+10>t?t-a+26+26:f+26>t?t-f:s+26>t?t-s+26:void 0}function r(e){function r(e){f[l++]=e}var n,i,u,a,s,f;if(e.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var c=e.length;s="="===e.charAt(c-2)?2:"="===e.charAt(c-1)?1:0,f=new o(3*e.length/4-s),u=s>0?e.length-4:e.length;var l=0;for(n=0,i=0;u>n;n+=4,i+=3)a=t(e.charAt(n))<<18|t(e.charAt(n+1))<<12|t(e.charAt(n+2))<<6|t(e.charAt(n+3)),r((16711680&a)>>16),r((65280&a)>>8),r(255&a);return 2===s?(a=t(e.charAt(n))<<2|t(e.charAt(n+1))>>4,r(255&a)):1===s&&(a=t(e.charAt(n))<<10|t(e.charAt(n+1))<<4|t(e.charAt(n+2))>>2,r(a>>8&255),r(255&a)),f}function n(e){function t(e){return c.charAt(e)}function r(e){return t(e>>18&63)+t(e>>12&63)+t(e>>6&63)+t(63&e)}var n,o,i,u=e.length%3,a="";for(n=0,i=e.length-u;i>n;n+=3)o=(e[n]<<16)+(e[n+1]<<8)+e[n+2],a+=r(o);switch(u){case 1:o=e[e.length-1],a+=t(o>>2),a+=t(o<<4&63),a+="==";break;case 2:o=(e[e.length-2]<<8)+e[e.length-1],a+=t(o>>10),a+=t(o>>4&63),a+=t(o<<2&63),a+="="}return a}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="+".charCodeAt(0),u="/".charCodeAt(0),a="0".charCodeAt(0),s="a".charCodeAt(0),f="A".charCodeAt(0),l="-".charCodeAt(0),d="_".charCodeAt(0);e.toByteArray=r,e.fromByteArray=n}("undefined"==typeof r?this.base64js={}:r)}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:10}],3:[function(e,t,r){(function(t,n,o,i,u,a,s,f,c){function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);var n=typeof e;if("base64"===t&&"string"===n)for(e=N(e);e.length%4!==0;)e+="=";var i;if("number"===n)i=F(e);else if("string"===n)i=o.byteLength(e,t);else{if("object"!==n)throw new Error("First argument needs to be a number, array or string.");i=F(e.length)}var u;
80o._useTypedArrays?u=o._augment(new Uint8Array(i)):(u=this,u.length=i,u._isBuffer=!0);var a;if(o._useTypedArrays&&"number"==typeof e.byteLength)u._set(e);else if(O(e))for(a=0;i>a;a++)o.isBuffer(e)?u[a]=e.readUInt8(a):u[a]=e[a];else if("string"===n)u.write(e,0,t);else if("number"===n&&!o._useTypedArrays&&!r)for(a=0;i>a;a++)u[a]=0;return u}function l(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var u=t.length;G(u%2===0,"Invalid hex string"),n>u/2&&(n=u/2);for(var a=0;n>a;a++){var s=parseInt(t.substr(2*a,2),16);G(!isNaN(s),"Invalid hex string"),e[r+a]=s}return o._charsWritten=2*a,a}function d(e,t,r,n){var i=o._charsWritten=W(V(t),e,r,n);return i}function h(e,t,r,n){var i=o._charsWritten=W(q(t),e,r,n);return i}function p(e,t,r,n){return h(e,t,r,n)}function g(e,t,r,n){var i=o._charsWritten=W(R(t),e,r,n);return i}function w(e,t,r,n){var i=o._charsWritten=W(P(t),e,r,n);return i}function y(e,t,r){return 0===t&&r===e.length?K.fromByteArray(e):K.fromByteArray(e.slice(t,r))}function m(e,t,r){var n="",o="";r=Math.min(e.length,r);for(var i=t;r>i;i++)e[i]<=127?(n+=J(o)+String.fromCharCode(e[i]),o=""):o+="%"+e[i].toString(16);return n+J(o)}function b(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;r>o;o++)n+=String.fromCharCode(e[o]);return n}function v(e,t,r){return b(e,t,r)}function _(e,t,r){var n=e.length;(!t||0>t)&&(t=0),(!r||0>r||r>n)&&(r=n);for(var o="",i=t;r>i;i++)o+=H(e[i]);return o}function E(e,t,r){for(var n=e.slice(t,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function I(e,t,r,n){n||(G("boolean"==typeof r,"missing or invalid endian"),G(void 0!==t&&null!==t,"missing offset"),G(t+1<e.length,"Trying to read beyond buffer length"));var o=e.length;if(!(t>=o)){var i;return r?(i=e[t],o>t+1&&(i|=e[t+1]<<8)):(i=e[t]<<8,o>t+1&&(i|=e[t+1])),i}}function A(e,t,r,n){n||(G("boolean"==typeof r,"missing or invalid endian"),G(void 0!==t&&null!==t,"missing offset"),G(t+3<e.length,"Trying to read beyond buffer length"));var o=e.length;if(!(t>=o)){var i;return r?(o>t+2&&(i=e[t+2]<<16),o>t+1&&(i|=e[t+1]<<8),i|=e[t],o>t+3&&(i+=e[t+3]<<24>>>0)):(o>t+1&&(i=e[t+1]<<16),o>t+2&&(i|=e[t+2]<<8),o>t+3&&(i|=e[t+3]),i+=e[t]<<24>>>0),i}}function B(e,t,r,n){n||(G("boolean"==typeof r,"missing or invalid endian"),G(void 0!==t&&null!==t,"missing offset"),G(t+1<e.length,"Trying to read beyond buffer length"));var o=e.length;if(!(t>=o)){var i=I(e,t,r,!0),u=32768&i;return u?-1*(65535-i+1):i}}function L(e,t,r,n){n||(G("boolean"==typeof r,"missing or invalid endian"),G(void 0!==t&&null!==t,"missing offset"),G(t+3<e.length,"Trying to read beyond buffer length"));var o=e.length;if(!(t>=o)){var i=A(e,t,r,!0),u=2147483648&i;return u?-1*(4294967295-i+1):i}}function U(e,t,r,n){return n||(G("boolean"==typeof r,"missing or invalid endian"),G(t+3<e.length,"Trying to read beyond buffer length")),Q.read(e,t,r,23,4)}function x(e,t,r,n){return n||(G("boolean"==typeof r,"missing or invalid endian"),G(t+7<e.length,"Trying to read beyond buffer length")),Q.read(e,t,r,52,8)}function S(e,t,r,n,o){o||(G(void 0!==t&&null!==t,"missing value"),G("boolean"==typeof n,"missing or invalid endian"),G(void 0!==r&&null!==r,"missing offset"),G(r+1<e.length,"trying to write beyond buffer length"),z(t,65535));var i=e.length;if(!(r>=i))for(var u=0,a=Math.min(i-r,2);a>u;u++)e[r+u]=(t&255<<8*(n?u:1-u))>>>8*(n?u:1-u)}function C(e,t,r,n,o){o||(G(void 0!==t&&null!==t,"missing value"),G("boolean"==typeof n,"missing or invalid endian"),G(void 0!==r&&null!==r,"missing offset"),G(r+3<e.length,"trying to write beyond buffer length"),z(t,4294967295));var i=e.length;if(!(r>=i))for(var u=0,a=Math.min(i-r,4);a>u;u++)e[r+u]=t>>>8*(n?u:3-u)&255}function j(e,t,r,n,o){o||(G(void 0!==t&&null!==t,"missing value"),G("boolean"==typeof n,"missing or invalid endian"),G(void 0!==r&&null!==r,"missing offset"),G(r+1<e.length,"Trying to write beyond buffer length"),X(t,32767,-32768));var i=e.length;r>=i||(t>=0?S(e,t,r,n,o):S(e,65535+t+1,r,n,o))}function k(e,t,r,n,o){o||(G(void 0!==t&&null!==t,"missing value"),G("boolean"==typeof n,"missing or invalid endian"),G(void 0!==r&&null!==r,"missing offset"),G(r+3<e.length,"Trying to write beyond buffer length"),X(t,2147483647,-2147483648));var i=e.length;r>=i||(t>=0?C(e,t,r,n,o):C(e,4294967295+t+1,r,n,o))}function T(e,t,r,n,o){o||(G(void 0!==t&&null!==t,"missing value"),G("boolean"==typeof n,"missing or invalid endian"),G(void 0!==r&&null!==r,"missing offset"),G(r+3<e.length,"Trying to write beyond buffer length"),$(t,3.4028234663852886e38,-3.4028234663852886e38));var i=e.length;r>=i||Q.write(e,t,r,n,23,4)}function M(e,t,r,n,o){o||(G(void 0!==t&&null!==t,"missing value"),G("boolean"==typeof n,"missing or invalid endian"),G(void 0!==r&&null!==r,"missing offset"),G(r+7<e.length,"Trying to write beyond buffer length"),$(t,1.7976931348623157e308,-1.7976931348623157e308));var i=e.length;r>=i||Q.write(e,t,r,n,52,8)}function N(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Y(e,t,r){return"number"!=typeof e?r:(e=~~e,e>=t?t:e>=0?e:(e+=t,e>=0?e:0))}function F(e){return e=~~Math.ceil(+e),0>
80e?0:e}function D(e){return(Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)})(e)}function O(e){return D(e)||o.isBuffer(e)||e&&"object"==typeof e&&"number"==typeof e.length}function H(e){return 16>e?"0"+e.toString(16):e.toString(16)}function V(e){for(var t=[],r=0;r<e.length;r++){var n=e.charCodeAt(r);if(127>=n)t.push(e.charCodeAt(r));else{var o=r;n>=55296&&57343>=n&&r++;for(var i=encodeURIComponent(e.slice(o,r+1)).substr(1).split("%"),u=0;u<i.length;u++)t.push(parseInt(i[u],16))}}return t}function q(e){for(var t=[],r=0;r<e.length;r++)t.push(255&e.charCodeAt(r));return t}function P(e){for(var t,r,n,o=[],i=0;i<e.length;i++)t=e.charCodeAt(i),r=t>>8,n=t%256,o.push(n),o.push(r);return o}function R(e){return K.toByteArray(e)}function W(e,t,r,n){for(var o=0;n>o&&!(o+r>=t.length||o>=e.length);o++)t[o+r]=e[o];return o}function J(e){try{return decodeURIComponent(e)}catch(t){return String.fromCharCode(65533)}}function z(e,t){G("number"==typeof e,"cannot write a non-number as a number"),G(e>=0,"specified a negative value for writing an unsigned value"),G(t>=e,"value is larger than maximum value for type"),G(Math.floor(e)===e,"value has a fractional component")}function X(e,t,r){G("number"==typeof e,"cannot write a non-number as a number"),G(t>=e,"value larger than maximum allowed value"),G(e>=r,"value smaller than minimum allowed value"),G(Math.floor(e)===e,"value has a fractional component")}function $(e,t,r){G("number"==typeof e,"cannot write a non-number as a number"),G(t>=e,"value larger than maximum allowed value"),G(e>=r,"value smaller than minimum allowed value")}function G(e,t){if(!e)throw new Error(t||"Failed assertion")}var K=e("base64-js"),Q=e("ieee754");r.Buffer=o,r.SlowBuffer=o,r.INSPECT_MAX_BYTES=50,o.poolSize=8192,o._useTypedArrays=function(){try{var e=new ArrayBuffer(0),t=new Uint8Array(e);return t.foo=function(){return 42},42===t.foo()&&"function"==typeof t.subarray}catch(r){return!1}}(),o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.isBuffer=function(e){return!(null===e||void 0===e||!e._isBuffer)},o.byteLength=function(e,t){var r;switch(e+="",t||"utf8"){case"hex":r=e.length/2;break;case"utf8":case"utf-8":r=V(e).length;break;case"ascii":case"binary":case"raw":r=e.length;break;case"base64":r=R(e).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":r=2*e.length;break;default:throw new Error("Unknown encoding")}return r},o.concat=function(e,t){if(G(D(e),"Usage: Buffer.concat(list, [totalLength])\nlist should be an Array."),0===e.length)return new o(0);if(1===e.length)return e[0];var r;if("number"!=typeof t)for(t=0,r=0;r<e.length;r++)t+=e[r].length;var n=new o(t),i=0;for(r=0;r<e.length;r++){var u=e[r];u.copy(n,i),i+=u.length}return n},o.prototype.write=function(e,t,r,n){if(isFinite(t))isFinite(r)||(n=r,r=void 0);else{var o=n;n=t,t=r,r=o}t=Number(t)||0;var i=this.length-t;r?(r=Number(r),r>i&&(r=i)):r=i,n=String(n||"utf8").toLowerCase();var u;switch(n){case"hex":u=l(this,e,t,r);break;case"utf8":case"utf-8":u=d(this,e,t,r);break;case"ascii":u=h(this,e,t,r);break;case"binary":u=p(this,e,t,r);break;case"base64":u=g(this,e,t,r);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":u=w(this,e,t,r);break;default:throw new Error("Unknown encoding")}return u},o.prototype.toString=function(e,t,r){var n=this;if(e=String(e||"utf8").toLowerCase(),t=Number(t)||0,r=void 0!==r?Number(r):r=n.length,r===t)return"";var o;switch(e){case"hex":o=_(n,t,r);break;case"utf8":case"utf-8":o=m(n,t,r);break;case"ascii":o=b(n,t,r);break;case"binary":o=v(n,t,r);break;case"base64":o=y(n,t,r);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":o=E(n,t,r);break;default:throw new Error("Unknown encoding")}return o},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},o.prototype.copy=function(e,t,r,n){var i=this;if(r||(r=0),n||0===n||(n=this.length),t||(t=0),n!==r&&0!==e.length&&0!==i.length){G(n>=r,"sourceEnd < sourceStart"),G(t>=0&&t<e.length,"targetStart out of bounds"),G(r>=0&&r<i.length,"sourceStart out of bounds"),G(n>=0&&n<=i.length,"sourceEnd out of bounds"),n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var u=n-r;if(100>u||!o._useTypedArrays)for(var a=0;u>a;a++)e[a+t]=this[a+r];else e._set(this.subarray(r,r+u),t)}},o.prototype.slice=function(e,t){var r=this.length;if(e=Y(e,r,0),t=Y(t,r,r),o._useTypedArrays)return o._augment(this.subarray(e,t));for(var n=t-e,i=new o(n,void 0,!0),u=0;n>u;u++)i[u]=this[u+e];return i},o.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},o.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},o.prototype.readUInt8=function(e,t){return t||(G(void 0!==e&&null!==e,"missing offset"),G(e<this.length,"Trying to read beyond buffer length")),e>=this.length?void 0:this[e]},o.prototype.readUInt16LE=function(e,t){return I(this,e,!0,t)},o.prototype.readUInt16BE=function(e,t){return I(this,e,!1,t)},o.prototype.readUInt32LE=function(e,t){return A(this,e,!0,t)},o.prototype.readUInt32BE=function(e,t){return A(this,e,!1,t)},o.prototype.readInt8=function(e,t){if(t||(G(void 0!==e&&null!==e,"missing offset"),G(e<this.length,"Trying to read beyond buffer length")),!(e>=this.length)){var r=128&this[e];return r?-1*(255-this[e]+1):this[e]}},o.prototype.readInt16LE=function(e,t){return B(this,e,!0,t)},o.prototype.readInt16BE=function(e,t){return B(this,e,!1,t)},o.prototype.readInt32LE=function(e,t){return L(this,e,!0,t)},o.prototype.readInt32BE=function(e,t){return L(this,e,!1,t)},o.prototype.readFloatLE=function(e,t){return U(this,e,!0,t)},o.prototype.readFloatBE=function(e,t){return U(this,e,!1,t)},o.prototype.readDoubleLE=function(e,t){return x(this,e,!0,t)},o.prototype.readDoubleBE=function(e,t){return x(this,e,!1,t)},o.prototype.writeUInt8=function(e,t,r){r||(G(void 0!==e&&null!==e,"missing value"),G(void 0!==t&&null!==t,"missing offset"),G(t<this.length,"trying to write beyond buffer length"),z(e,255)),t>=this.length||(this[t]=e)},o.prototype.writeUInt16LE=function(e,t,r){S(this,e,t,!0,r)},o.prototype.writeUInt16BE=function(e,t,r){S(this,e,t,!1,r)},o.prototype.writeUInt32LE=function(e,t,r){C(this,e,t,!0,r)},o.prototype.writeUInt32BE=function(e,t,r){C(this,e,t,!1,r)},o.prototype.writeInt8=function(e,t,r){r||(G(void 0!==e&&null!==e,"missing value"),G(void 0!==t&&null!==t,"missing offset"),G(t<this.length,"Trying to write beyond buffer length"),X(e,127,-128)),t>=this.length||(e>=0?this.writeUInt8(e,t,r):this.writeUInt8(255+e+1,t,r))},o.prototype.writeInt16LE=function(e,t,r){j(this,e,t,!0,r)},o.prototype.writeInt16BE=function(e,t,r){j(this,e,t,!1,r)},o.prototype.writeInt32LE=function(e,t,r){k(this,e,t,!0,r)},o.prototype.writeInt32BE=function(e,t,r){k(this,e,t,!1,r)},o.prototype.writeFloatLE=function(e,t,r){T(this,e,t,!0,r)},o.prototype.writeFloatBE=function(e,t,r){T(this,e,t,!1,r)},o.prototype.writeDoubleLE=function(e,t,r){M(this,e,t,!0,r)},o.prototype.writeDoubleBE=function(e,t,r){M(this,e,t,!1,r)},o.prototype.fill=function(e,t,r){if(e||(e=0),t||(t=0),r||(r=this.length),"string"==typeof e&&(e=e.charCodeAt(0)),G("number"==typeof e&&!isNaN(e),"value is not a number"),G(r>=t,"end < start"),r!==t&&0!==this.length){G(t>=0&&t<this.length,"start out of bounds"),G(r>=0&&r<=this.length,"end out of bounds");for(var n=t;r>n;n++)this[n]=e}},o.prototype.inspect=function(){for(var e=[],t=this.length,n=0;t>n;n++)if(e[n]=H(this[n]),n===r.INSPECT_MAX_BYTES){e[n+1]="...";break}return"<Buffer "+e.join(" ")+">"},o.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(o._useTypedArrays)return new o(this).buffer;for(var e=new Uint8Array(this.length),t=0,r=e.length;r>t;t+=1)e[t]=this[t];return e.buffer}throw new Error("Buffer.toArrayBuffer not supported in this browser")};var Z=o.prototype;o._augment=function(e){return e._isBuffer=!0,e._get=e.get,e._set=e.set,e.get=Z.get,e.set=Z.set,e.write=Z.write,e.toString=Z.toString,e.toLocaleStr
80ing=Z.toString,e.toJSON=Z.toJSON,e.copy=Z.copy,e.slice=Z.slice,e.readUInt8=Z.readUInt8,e.readUInt16LE=Z.readUInt16LE,e.readUInt16BE=Z.readUInt16BE,e.readUInt32LE=Z.readUInt32LE,e.readUInt32BE=Z.readUInt32BE,e.readInt8=Z.readInt8,e.readInt16LE=Z.readInt16LE,e.readInt16BE=Z.readInt16BE,e.readInt32LE=Z.readInt32LE,e.readInt32BE=Z.readInt32BE,e.readFloatLE=Z.readFloatLE,e.readFloatBE=Z.readFloatBE,e.readDoubleLE=Z.readDoubleLE,e.readDoubleBE=Z.readDoubleBE,e.writeUInt8=Z.writeUInt8,e.writeUInt16LE=Z.writeUInt16LE,e.writeUInt16BE=Z.writeUInt16BE,e.writeUInt32LE=Z.writeUInt32LE,e.writeUInt32BE=Z.writeUInt32BE,e.writeInt8=Z.writeInt8,e.writeInt16LE=Z.writeInt16LE,e.writeInt16BE=Z.writeInt16BE,e.writeInt32LE=Z.writeInt32LE,e.writeInt32BE=Z.writeInt32BE,e.writeFloatLE=Z.writeFloatLE,e.writeFloatBE=Z.writeFloatBE,e.writeDoubleLE=Z.writeDoubleLE,e.writeDoubleBE=Z.writeDoubleBE,e.fill=Z.fill,e.inspect=Z.inspect,e.toArrayBuffer=Z.toArrayBuffer,e}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:11,lYpoI2:10}],4:[function(e,t,r){(function(r,n,o,i,u,a,s,f,c){function l(e,t){if(e.length%p!==0){var r=e.length+(p-e.length%p);e=o.concat([e,g],r)}for(var n=[],i=t?e.readInt32BE:e.readInt32LE,u=0;u<e.length;u+=p)n.push(i.call(e,u));return n}function d(e,t,r){for(var n=new o(t),i=r?n.writeInt32BE:n.writeInt32LE,u=0;u<e.length;u++)i.call(n,e[u],4*u,!0);return n}function h(e,t,r,n){o.isBuffer(e)||(e=new o(e));var i=t(l(e,n),e.length*w);return d(i,r,n)}var o=e("buffer").Buffer,p=4,g=new o(p);g.fill(0);var w=8;t.exports={hash:h}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/helpers.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:10}],5:[function(e,t,r){(function(t,n,o,i,u,a,s,f,c){function l(e,t,r){o.isBuffer(t)||(t=new o(t)),o.isBuffer(r)||(r=new o(r)),t.length>v?t=e(t):t.length<v&&(t=o.concat([t,_],v));for(var n=new o(v),i=new o(v),u=0;v>u;u++)n[u]=54^t[u],i[u]=92^t[u];var a=e(o.concat([n,r]));return e(o.concat([i,a]))}function d(e,t){e=e||"sha1";var r=b[e],n=[],i=0;return r||h("algorithm:",e,"is not yet supported"),{update:function(e){return o.isBuffer(e)||(e=new o(e)),n.push(e),i+=e.length,this},digest:function(e){var i=o.concat(n),u=t?l(r,t,i):r(i);return n=null,e?u.toString(e):u}}}function h(){var e=[].slice.call(arguments).join(" ");throw new Error([e,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}function p(e,t){for(var r in e)t(e[r],r)}var o=e("buffer").Buffer,g=e("./sha"),w=e("./sha256"),y=e("./rng"),m=e("./md5"),b={sha1:g,sha256:w,md5:m},v=64,_=new o(v);_.fill(0),r.createHash=function(e){return d(e)},r.createHmac=function(e,t){return d(e,t)},r.randomBytes=function(e,t){if(!t||!t.call)return new o(y(e));try{t.call(this,void 0,new o(y(e)))}catch(r){t(r)}},p(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],function(e){r[e]=function(){h("sorry,",e,"is not implemented yet")}})}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/index.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./md5":6,"./rng":7,"./sha":8,"./sha256":9,buffer:3,lYpoI2:10}],6:[function(e,t,r){(function(r,n,o,i,u,a,s,f,c){function l(e,t){e[t>>5]|=128<<t%32,e[(t+64>>>9<<4)+14]=t;for(var r=1732584193,n=-271733879,o=-1732584194,i=271733878,u=0;u<e.length;u+=16){var a=r,s=n,f=o,c=i;r=h(r,n,o,i,e[u+0],7,-680876936),i=h(i,r,n,o,e[u+1],12,-389564586),o=h(o,i,r,n,e[u+2],17,606105819),n=h(n,o,i,r,e[u+3],22,-1044525330),r=h(r,n,o,i,e[u+4],7,-176418897),i=h(i,r,n,o,e[u+5],12,1200080426),o=h(o,i,r,n,e[u+6],17,-1473231341),n=h(n,o,i,r,e[u+7],22,-45705983),r=h(r,n,o,i,e[u+8],7,1770035416),i=h(i,r,n,o,e[u+9],12,-1958414417),o=h(o,i,r,n,e[u+10],17,-42063),n=h(n,o,i,r,e[u+11],22,-1990404162),r=h(r,n,o,i,e[u+12],7,1804603682),i=h(i,r,n,o,e[u+13],12,-40341101),o=h(o,i,r,n,e[u+14],17,-1502002290),n=h(n,o,i,r,e[u+15],22,1236535329),r=p(r,n,o,i,e[u+1],5,-165796510),i=p(i,r,n,o,e[u+6],9,-1069501632),o=p(o,i,r,n,e[u+11],14,643717713),n=p(n,o,i,r,e[u+0],20,-373897302),r=p(r,n,o,i,e[u+5],5,-701558691),i=p(i,r,n,o,e[u+10],9,38016083),o=p(o,i,r,n,e[u+15],14,-660478335),n=p(n,o,i,r,e[u+4],20,-405537848),r=p(r,n,o,i,e[u+9],5,568446438),i=p(i,r,n,o,e[u+14],9,-1019803690),o=p(o,i,r,n,e[u+3],14,-187363961),n=p(n,o,i,r,e[u+8],20,1163531501),r=p(r,n,o,i,e[u+13],5,-1444681467),i=p(i,r,n,o,e[u+2],9,-51403784),o=p(o,i,r,n,e[u+7],14,1735328473),n=p(n,o,i,r,e[u+12],20,-1926607734),r=g(r,n,o,i,e[u+5],4,-378558),i=g(i,r,n,o,e[u+8],11,-2022574463),o=g(o,i,r,n,e[u+11],16,1839030562),n=g(n,o,i,r,e[u+14],23,-35309556),r=g(r,
80n,o,i,e[u+1],4,-1530992060),i=g(i,r,n,o,e[u+4],11,1272893353),o=g(o,i,r,n,e[u+7],16,-155497632),n=g(n,o,i,r,e[u+10],23,-1094730640),r=g(r,n,o,i,e[u+13],4,681279174),i=g(i,r,n,o,e[u+0],11,-358537222),o=g(o,i,r,n,e[u+3],16,-722521979),n=g(n,o,i,r,e[u+6],23,76029189),r=g(r,n,o,i,e[u+9],4,-640364487),i=g(i,r,n,o,e[u+12],11,-421815835),o=g(o,i,r,n,e[u+15],16,530742520),n=g(n,o,i,r,e[u+2],23,-995338651),r=w(r,n,o,i,e[u+0],6,-198630844),i=w(i,r,n,o,e[u+7],10,1126891415),o=w(o,i,r,n,e[u+14],15,-1416354905),n=w(n,o,i,r,e[u+5],21,-57434055),r=w(r,n,o,i,e[u+12],6,1700485571),i=w(i,r,n,o,e[u+3],10,-1894986606),o=w(o,i,r,n,e[u+10],15,-1051523),n=w(n,o,i,r,e[u+1],21,-2054922799),r=w(r,n,o,i,e[u+8],6,1873313359),i=w(i,r,n,o,e[u+15],10,-30611744),o=w(o,i,r,n,e[u+6],15,-1560198380),n=w(n,o,i,r,e[u+13],21,1309151649),r=w(r,n,o,i,e[u+4],6,-145523070),i=w(i,r,n,o,e[u+11],10,-1120210379),o=w(o,i,r,n,e[u+2],15,718787259),n=w(n,o,i,r,e[u+9],21,-343485551),r=y(r,a),n=y(n,s),o=y(o,f),i=y(i,c)}return Array(r,n,o,i)}function d(e,t,r,n,o,i){return y(m(y(y(t,e),y(n,i)),o),r)}function h(e,t,r,n,o,i,u){return d(t&r|~t&n,e,t,o,i,u)}function p(e,t,r,n,o,i,u){return d(t&n|r&~n,e,t,o,i,u)}function g(e,t,r,n,o,i,u){return d(t^r^n,e,t,o,i,u)}function w(e,t,r,n,o,i,u){return d(r^(t|~n),e,t,o,i,u)}function y(e,t){var r=(65535&e)+(65535&t),n=(e>>16)+(t>>16)+(r>>16);return n<<16|65535&r}function m(e,t){return e<<t|e>>>32-t}var b=e("./helpers");t.exports=function(e){return b.hash(e,l,16)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:10}],7:[function(e,t,r){(function(e,r,n,o,i,u,a,s,f){!function(){var e,r,n=this;e=function(e){for(var t,t,r=new Array(e),n=0;e>n;n++)0==(3&n)&&(t=4294967296*Math.random()),r[n]=t>>>((3&n)<<3)&255;return r},n.crypto&&crypto.getRandomValues&&(r=function(e){var t=new Uint8Array(e);return crypto.getRandomValues(t),t}),t.exports=r||e}()}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:10}],8:[function(e,t,r){(function(r,n,o,i,u,a,s,f,c){function l(e,t){e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t;for(var r=Array(80),n=1732584193,o=-271733879,i=-1732584194,u=271733878,a=-1009589776,s=0;s<e.length;s+=16){for(var f=n,c=o,l=i,w=u,y=a,m=0;80>m;m++){16>m?r[m]=e[s+m]:r[m]=g(r[m-3]^r[m-8]^r[m-14]^r[m-16],1);var b=p(p(g(n,5),d(m,o,i,u)),p(p(a,r[m]),h(m)));a=u,u=i,i=g(o,30),o=n,n=b}n=p(n,f),o=p(o,c),i=p(i,l),u=p(u,w),a=p(a,y)}return Array(n,o,i,u,a)}function d(e,t,r,n){return 20>e?t&r|~t&n:40>e?t^r^n:60>e?t&r|t&n|r&n:t^r^n}function h(e){return 20>e?1518500249:40>e?1859775393:60>e?-1894007588:-899497514}function p(e,t){var r=(65535&e)+(65535&t),n=(e>>16)+(t>>16)+(r>>16);return n<<16|65535&r}function g(e,t){return e<<t|e>>>32-t}var w=e("./helpers");t.exports=function(e){return w.hash(e,l,20,!0)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:10}],9:[function(e,t,r){(function(r,n,o,i,u,a,s,f,c){var l=e("./helpers"),d=function(e,t){var r=(65535&e)+(65535&t),n=(e>>16)+(t>>16)+(r>>16);return n<<16|65535&r},h=function(e,t){return e>>>t|e<<32-t; 81},p=function(e,t){return e>>>t},g=function(e,t,r){return e&t^~e&r},w=function(e,t,r){return e&t^e&r^t&r},y=function(e){return h(e,2)^h(e,13)^h(e,22)},m=function(e){return h(e,6)^h(e,11)^h(e,25)},b=function(e){return h(e,7)^h(e,18)^p(e,3)},v=function(e){return h(e,17)^h(e,19)^p(e,10)},_=function(e,t){var r,n,o,i,u,a,s,f,c,l,h,p,_=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756
81734187,3204031479,3329325298),E=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),I=new Array(64);e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t;for(var c=0;c<e.length;c+=16){r=E[0],n=E[1],o=E[2],i=E[3],u=E[4],a=E[5],s=E[6],f=E[7];for(var l=0;64>l;l++)16>l?I[l]=e[l+c]:I[l]=d(d(d(v(I[l-2]),I[l-7]),b(I[l-15])),I[l-16]),h=d(d(d(d(f,m(u)),g(u,a,s)),_[l]),I[l]),p=d(y(r),w(r,n,o)),f=s,s=a,a=u,u=d(i,h),i=o,o=n,n=r,r=d(h,p);E[0]=d(r,E[0]),E[1]=d(n,E[1]),E[2]=d(o,E[2]),E[3]=d(i,E[3]),E[4]=d(u,E[4]),E[5]=d(a,E[5]),E[6]=d(s,E[6]),E[7]=d(f,E[7])}return E};t.exports=function(e){return l.hash(e,_,32,!0)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:10}],10:[function(e,t,r){(function(e,r,n,o,i,u,a,s,f){function c(){}var e=t.exports={};e.nextTick=function(){var e="undefined"!=typeof window&&window.setImmediate,t="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};if(t){var r=[];return window.addEventListener("message",function(e){var t=e.source;if((t===window||null===t)&&"process-tick"===e.data&&(e.stopPropagation(),r.length>0)){var n=r.shift();n()}},!0),function(e){r.push(e),window.postMessage("process-tick","*")}}return function(e){setTimeout(e,0)}}(),e.title="browser",e.browser=!0,e.env={},e.argv=[],e.on=c,e.addListener=c,e.once=c,e.off=c,e.removeListener=c,e.removeAllListeners=c,e.emit=c,e.binding=function(e){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(e){throw new Error("process.chdir is not supported")}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/process/browser.js","/node_modules/gulp-browserify/node_modules/process")},{buffer:3,lYpoI2:10}],11:[function(e,t,r){(function(e,t,n,o,i,u,a,s,f){r.read=function(e,t,r,n,o){var i,u,a=8*o-n-1,s=(1<<a)-1,f=s>>1,c=-7,l=r?o-1:0,d=r?-1:1,h=e[t+l];for(l+=d,i=h&(1<<-c)-1,h>>=-c,c+=a;c>0;i=256*i+e[t+l],l+=d,c-=8);for(u=i&(1<<-c)-1,i>>=-c,c+=n;c>0;u=256*u+e[t+l],l+=d,c-=8);if(0===i)i=1-f;else{if(i===s)return u?NaN:(h?-1:1)*(1/0);u+=Math.pow(2,n),i-=f}return(h?-1:1)*u*Math.pow(2,i-n)},r.write=function(e,t,r,n,o,i){var u,a,s,f=8*i-o-1,c=(1<<f)-1,l=c>>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,p=n?1:-1,g=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,u=c):(u=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-u))<1&&(u--,s*=2),t+=u+l>=1?d/s:d*Math.pow(2,1-l),t*s>=2&&(u++,s/=2),u+l>=c?(a=0,u=c):u+l>=1?(a=(t*s-1)*Math.pow(2,o),u+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,o),u=0));o>=8;e[r+h]=255&a,h+=p,a/=256,o-=8);for(u=u<<o|a,f+=o;f>0;e[r+h]=255&u,h+=p,u/=256,f-=8);e[r+h-p]|=128*g}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/ieee754/index.js","/node_modules/ieee754")},{buffer:3,lYpoI2:10}]},{},[1])(1)});; 82/* AUTOGENERATED: jquery.validationEngine-en.js */ 83!function(e){e.fn.validationEngineLanguage=function(){},e.validationEngineLanguage={newLang:function(){e.validationEngineLanguage.allRules={required:{regex:"none",alertText:"* This field is required",alertTextCheckboxMultiple:"* Please select an option",alertTextCheckboxe:"* This checkbox is required",alertTextDateRange:"* Both date range fields are required"},requiredInFunction:{func:function(e,a,t,d){return"test"==e.val()},alertText:"* Field must equal test"},dateRange:{regex:"none",alertText:"* Invalid ",alertText2:"Date Range"},dateTimeRange:{regex:"none",alertText:"* Invalid ",alertText2:"Date Time Range"},minSize:{regex:"none",alertText:"* Minimum ",alertText2:" characters required"},maxSize:{regex:"none",alertText:"* Maximum ",alertText2:" characters allowed"},groupRequired:{regex:"none",alertText:"* You must fill one of the following fields",alertTextCheckboxMultiple:"* Please select an option",alertTextCheckboxe:"* This checkbox is required"},min:{regex:"none",alertText:"* Minimum value is "},max:{regex:"none",alertText:"* Maximum value is "},past:{regex:"none",alertText:"* Date prior to "},future:{regex:"none",alertText:"* Date past "},maxCheckbox:{regex:"none",alertText:"* Maximum ",alertText2:" options allowed"},minCheckbox:{regex:"none",alertText:"* Please select ",alertText2:" options"},equals:{regex:"none",alertText:"* Fields do not match"},creditCard:{regex:"none",alertText:"* Invalid credit card number"},phone:{regex:/^([\+][0-9]{1,3}([ \.\-])?)?([\(][0-9]{1,6}[\)])?([0-9 \.\-]{1,32})(([A-Za-z \:]{1,11})?[0-9]{1,4}?)$/,alertText:"* Invalid phone number"},email:{regex:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,alertText:"* Invalid email address"},fullname:{regex:/^([a-zA-Z]+[\'\,\.\-]?[a-zA-Z ]*)+[ ]([a-zA-Z]+[\'\,\.\-]?[a-zA-Z ]+)+$/,alertText:"* Must be first and last name"},zip:{regex:/^\d{5}$|^\d{5}-\d{4}$/,alertText:"* Invalid zip format"},integer:{regex:/^[\-\+]?\d+$/,alertText:"* Not a valid integer"},number:{regex:/^[\-\+]?((([0-9]{1,3})([,][0-9]{3})*)|([0-9]+))?([\.]([0-9]+))?$/,alertText:"* Invalid floating decimal number"},date:{func:function(e){var a=new RegExp(/^(\d{4})[\/\-\.](0?[1-9]|1[012])[\/\-\.](0?[1-9]|[12][0-9]|3[01])$/).exec(e.val());if(null==a)return!1;var t=a[1],d=+a[2],r=+a[3],l=new Date(t,d-1,r);return l.getFullYear()==t&&l.getMonth()==d-1&&l.getDate()==r},alertText:"* Invalid date, must be in YYYY-MM-DD format"},ipv4:{regex:/^((([01]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))[.]){3}(([0-1]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))$/,alertText:"* Invalid IP address"},ip:{regex:/((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))/,alertText:"* Invalid IP address"},url:{regex:/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,alertText:"* Invalid URL"},onlyNumberSp:{regex:/^[0-9\ ]+$/,alertText:"* Numbers only"},onlyLetterSp:{regex:/^[a-zA-Z\ \']+$/,alertText:"* Letters only"}
83,onlyLetterAccentSp:{regex:/^[a-z\u00C0-\u017F\ ]+$/i,alertText:"* Letters only (accents allowed)"},onlyLetterNumber:{regex:/^[0-9a-zA-Z]+$/,alertText:"* No special characters allowed"},ajaxUserCall:{url:"ajaxValidateFieldUser",extraData:"name=eric",alertText:"* This user is already taken",alertTextLoad:"* Validating, please wait"},ajaxUserCallPhp:{url:"phpajax/ajaxValidateFieldUser.php",extraData:"name=eric",alertTextOk:"* This username is available",alertText:"* This user is already taken",alertTextLoad:"* Validating, please wait"},ajaxNameCall:{url:"ajaxValidateFieldName",alertText:"* This name is already taken",alertTextOk:"* This name is available",alertTextLoad:"* Validating, please wait"},ajaxNameCallPhp:{url:"phpajax/ajaxValidateFieldName.php",alertText:"* This name is already taken",alertTextLoad:"* Validating, please wait"},validate2fields:{alertText:"* Please input HELLO"},dateFormat:{regex:/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$|^(?:(?:(?:0?[13578]|1[02])(\/|-)31)|(?:(?:0?[1,3-9]|1[0-2])(\/|-)(?:29|30)))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(?:(?:0?[1-9]|1[0-2])(\/|-)(?:0?[1-9]|1\d|2[0-8]))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(0?2(\/|-)29)(\/|-)(?:(?:0[48]00|[13579][26]00|[2468][048]00)|(?:\d\d)?(?:0[48]|[2468][048]|[13579][26]))$/,alertText:"* Invalid Date"},dateTimeFormat:{regex:/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])\s+(1[012]|0?[1-9]){1}:(0?[1-5]|[0-6][0-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+(am|pm|AM|PM){1}$|^(?:(?:(?:0?[13578]|1[02])(\/|-)31)|(?:(?:0?[1,3-9]|1[0-2])(\/|-)(?:29|30)))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^((1[012]|0?[1-9]){1}\/(0?[1-9]|[12][0-9]|3[01]){1}\/\d{2,4}\s+(1[012]|0?[1-9]){1}:(0?[1-5]|[0-6][0-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+(am|pm|AM|PM){1})$/,alertText:"* Invalid Date or Date Format",alertText2:"Expected Format: ",alertText3:"mm/dd/yyyy hh:mm:ss AM|PM or ",alertText4:"yyyy-mm-dd hh:mm:ss AM|PM"}}}},e.validationEngineLanguage.newLang()}(jQuery);; 84/* AUTOGENERATED: jquery.validationEngine.js */ 85!function(T){"use strict";var F={init:function(e){var t=this;return t.data("jqv")&&null!=t.data("jqv")||(e=F._saveOptions(t,e),T(document).on("click",".formError",function(){T(this).fadeOut(150,function(){T(this).closest(".formError").remove()})})),this},attach:function(e){var t,a=this;return(t=e?F._saveOptions(a,e):a.data("jqv")).validateAttribute=a.find("[data-validation-engine*=validate]").length?"data-validation-engine":"class",t.binded&&(a.on(t.validationEventTrigger,"["+t.validateAttribute+"*=validate]:not([type=checkbox]):not([type=radio]):not(.datepicker)",F._onFieldEvent),a.on("click","["+t.validateAttribute+"*=validate][type=checkbox],["+t.validateAttribute+"*=validate][type=radio]",F._onFieldEvent),a.on(t.validationEventTrigger,"["+t.validateAttribute+"*=validate][class*=datepicker]",{delay:300},F._onFieldEvent)),t.autoPositionUpdate&&T(window).bind("resize",{noAnimation:!0,formElem:a},F.updatePromptsPosition),a.on("click","a[data-validation-engine-skip], a[class*='validate-skip'], button[data-validation-engine-skip], button[class*='validate-skip'], input[data-validation-engine-skip], input[class*='validate-skip']",F._submitButtonClick),a.removeData("jqv_submitButton"),a.on("submit",F._onSubmitEvent),this},detach:function(){var e=this,t=e.data("jqv");return e.off(t.validationEventTrigger,"["+t.validateAttribute+"*=validate]:not([type=checkbox]):not([type=radio]):not(.datepicker)",F._onFieldEvent),e.off("click","["+t.validateAttribute+"*=validate][type=checkbox],["+t.validateAttribute+"*=validate][type=radio]",F._onFieldEvent),e.off(t.validationEventTrigger,"["+t.validateAttribute+"*=validate][class*=datepicker]",F._onFieldEvent),e.off("submit",F._onSubmitEvent),e.removeData("jqv"),e.off("click","a[data-validation-engine-skip], a[class*='validate-skip'], button[data-validation-engine-skip], button[class*='validate-skip'], input[data-validation-engine-skip], input[class*='validate-skip']",F._submitButtonClick),e.removeData("jqv_submitButton"),t.autoPositionUpdate&&T(window).off("resize",F.updatePromptsPosition),this},validate:function(e){var t,a=T(this),r=null;
85if(a.is("form")||a.hasClass("validationEngineContainer")){if(a.hasClass("validating"))return!1;a.addClass("validating"),t=e?F._saveOptions(a,e):a.data("jqv");r=F._validateFields(this);setTimeout(function(){a.removeClass("validating")},100),r&&t.onSuccess?t.onSuccess():!r&&t.onFailure&&t.onFailure()}else{if(!a.is("form")&&!a.hasClass("validationEngineContainer")){var i=a.closest("form, .validationEngineContainer");return t=i.data("jqv")?i.data("jqv"):T.validationEngine.defaults,(r=F._validateField(a,t))&&t.onFieldSuccess?t.onFieldSuccess():t.onFieldFailure&&0<t.InvalidFields.length&&t.onFieldFailure(),!r}a.removeClass("validating")}return t.onValidationComplete?!!t.onValidationComplete(i,r):r},updatePromptsPosition:function(e){if(e&&this==window)var r=e.data.formElem,i=e.data.noAnimation;else r=T(this.closest("form, .validationEngineContainer"));var o=r.data("jqv");return o||(o=F._saveOptions(r,o)),r.find("["+o.validateAttribute+"*=validate]").not(":disabled").each(function(){var e=T(this);o.prettySelect&&e.is(":hidden")&&(e=r.find("#"+o.usePrefix+e.attr("id")+o.useSuffix));var t=F._getPrompt(e),a=T(t).find(".formErrorContent").html();t&&F._updatePrompt(e,T(t),a,void 0,!1,o,i)}),this},showPrompt:function(e,t,a,r){var i=this.closest("form, .validationEngineContainer").data("jqv");return i||(i=F._saveOptions(this,i)),a&&(i.promptPosition=a),i.showArrow=1==r,F._showPrompt(this,e,t,!1,i),this},hide:function(){var e=T(this).closest("form, .validationEngineContainer"),t=e.data("jqv");t||(t=F._saveOptions(e,t));var a,r=t&&t.fadeDuration?t.fadeDuration:.3;
85return a=e.is("form")||e.hasClass("validationEngineContainer")?"parentForm"+F._getClassName(T(e).attr("id")):F._getClassName(T(e).attr("id"))+"formError",T("."+a).fadeTo(r,0,function(){T(this).closest(".formError").remove()}),this},hideAll:function(){var e=this.data("jqv"),t=e?e.fadeDuration:300;return T(".formError").fadeTo(t,0,function(){T(this).closest(".formError").remove()}),this},_onFieldEvent:function(e){var t=T(this),a=t.closest("form, .validationEngineContainer"),r=a.data("jqv");r||(r=F._saveOptions(a,r)),r.eventTrigger="field",1==r.notEmpty?0<t.val().length&&window.setTimeout(function(){F._validateField(t,r)},e.data?e.data.delay:0):window.setTimeout(function(){F._validateField(t,r)},e.data?e.data.delay:0)},_onSubmitEvent:function(){var e=T(this),t=e.data("jqv");if(e.data("jqv_submitButton")){var a=T("#"+e.data("jqv_submitButton"));if(a&&0<a.length&&(a.hasClass("validate-skip")||"true"==a.attr("data-validation-engine-skip")))return!0}t.eventTrigger="submit";var r=F._validateFields(e);return r&&t.ajaxFormValidation?(F._validateFormWithAjax(e,t),!1):t.onValidationComplete?!!t.onValidationComplete(e,r):r},_checkAjaxStatus:function(e){var a=!0;return T.each(e.ajaxValidCache,function(e,t){if(!t)return a=!1}),a},_checkAjaxFieldStatus:function(e,t){return 1==t.ajaxValidCache[e]},_validateFields:function(a){var r=a.data("jqv"),i=!1;a.trigger("jqv.form.validating");var o=null;if(a.find("["+r.validateAttribute+"*=validate]").not(":disabled").each(function(){var e=T(this),t=[];if(T.inArray(e.attr("name"),t)<0){if((i|=F._validateField(e,r))&&null==o&&(o=e.is(":hidden")&&r.prettySelect?e=a.find("#"+r.usePrefix+F._jqSelector(e.attr("id"))+r.useSuffix):(e.data("jqv-prompt-at")instanceof jQuery?e=e.data("jqv-prompt-at"):e.data("jqv-prompt-at")&&(e=T(e.data("jqv-prompt-at"))),e)),r.doNotShowAllErrosOnSubmit)return!1;if(t.push(e.attr("name")),1==r.showOneMessage&&i)return!1}}),a.trigger("jqv.form.result",[i]),i){if(r.scroll){var e=o.offset().top,t=o.offset().left,s=r.promptPosition;if("string"==typeof s&&-1!=s.indexOf(":")&&(s=s.substring(0,s.indexOf(":"))),"bottomRight"!=s&&"bottomLeft"!=s){var n=F._getPrompt(o);n&&(e=n.offset().top)}if(r.scrollOffset&&(e-=r.scrollOffset),r.isOverflown){var l=T(r.overflownDIV);if(!l.length)return!1;e+=l.scrollTop()+-parseInt(l.offset().top)-5,T(r.overflownDIV).filter(":not(:animated)").animate({scrollTop:e},1100,function(){r.focusFirstField&&o.focus()})}else T("html, body").animate({scrollTop:e},1100,function(){r.focusFirstField&&o.focus()}),T("html, body").animate({scrollLeft:t},1100)}else r.focusFirstField&&o.focus();return!1}return!0},_validateFormWithAjax:function(l,d){var e=l.serialize(),t=d.ajaxFormValidationMethod?d.ajaxFormValidationMethod:"GET",a=d.ajaxFormValidationURL?d.ajaxFormValidationURL:l.attr("action"),u=d.dataType?d.dataType:"json";T.ajax({type:t,url:a,cache:!1,dataType:u,data:e,form:l,methods:F,options:d,beforeSend:function(){return d.onBeforeAjaxFormValidation(l,d)},error:function(e,t){d.onFailure?d.onFailure(e,t):F._ajaxError(e,t)},success:function(e){if("json"==u&&!0!==e){for(var t=!1,a=0;a<e.length;a++){var r=e[a],i=r[0],o=T(T("#"+i)[0]);if(1==o.length){var s=r[2];if(1==r[1])if(""!=s&&s){if(d.allrules[s])(n=d.allrules[s].alertTextOk)&&(s=n);d.showPrompts&&F._showPrompt(o,s,"pass",!1,d,!0)}else F._closePrompt(o);else{var n;if(t|=!0,d.allrules[s])(n=d.allrules[s].alertText)&&(s=n);d.showPrompts&&F._showPrompt(o,s,"",!1,d,!0)}}}d.onAjaxFormComplete(!t,l,e,d)}else d.onAjaxFormComplete(!0,l,e,d)}})},_validateField:function(e,t,a){if(e.attr("id")||(e.attr("id","form-validation-field-"+T.validationEngine.fieldIdCounter),++T.validationEngine.fieldIdCounter),e.hasClass(t.ignoreFieldsWithClass))return!1;if(!t.validateNonVisibleFields&&(e.is(":hidden")&&!t.prettySelect||e.parent().is(":hidden")))return!1;var r=e.attr(t.validateAttribute),i=/validate\[(.*)\]/.exec(r);if(!i)return!1;var o=i[1],s=o.split(/\[|,|\]/),n=e.attr("name"),l="",d="",u=!1,c=!1;t.isError=!1,t.showArrow=1==t.showArrow,0<t.maxErrorsPerField&&(c=!0);for(var f=T(e.closest("form, .validationEngineContainer")),v=0;v<s.length;v++)s[v]=s[v].toString().replace(" ",""),""===s[v]&&delete s[v];v=0;for(var p=0;v<s.length;v++){if(c&&p>=t.maxErrorsPerField){if(!u){var m=T.inArray("required",s);u=-1!=m&&v<=m}break}var g=void 0;switch(s[v]){case"required":u=!0,g=F._getErrorMessage(f,e,s[v],s,v,t,F._required);break;
85case"custom":g=F._getErrorMessage(f,e,s[v],s,v,t,F._custom);break;case"groupRequired":var h="["+t.validateAttribute+"*="+s[v+1]+"]",x=f.find(h).eq(0);x[0]!=e[0]&&(F._validateField(x,t,a),t.showArrow=!0),(g=F._getErrorMessage(f,e,s[v],s,v,t,F._groupRequired))&&(u=!0),t.showArrow=!1;break;case"ajax":(g=F._ajax(e,s,v,t))&&(d="load");break;case"minSize":g=F._getErrorMessage(f,e,s[v],s,v,t,F._minSize);break;case"maxSize":g=F._getErrorMessage(f,e,s[v],s,v,t,F._maxSize);break;case"min":g=F._getErrorMessage(f,e,s[v],s,v,t,F._min);break;case"max":g=F._getErrorMessage(f,e,s[v],s,v,t,F._max);break;case"past":g=F._getErrorMessage(f,e,s[v],s,v,t,F._past);break;case"future":g=F._getErrorMessage(f,e,s[v],s,v,t,F._future);break;case"dateRange":h="["+t.validateAttribute+"*="+s[v+1]+"]";t.firstOfGroup=f.find(h).eq(0),t.secondOfGroup=f.find(h).eq(1),(t.firstOfGroup[0].value||t.secondOfGroup[0].value)&&(g=F._getErrorMessage(f,e,s[v],s,v,t,F._dateRange)),g&&(u=!0),t.showArrow=!1;break;case"dateTimeRange":h="["+t.validateAttribute+"*="+s[v+1]+"]";t.firstOfGroup=f.find(h).eq(0),t.secondOfGroup=f.find(h).eq(1),(t.firstOfGroup[0].value||t.secondOfGroup[0].value)&&(g=F._getErrorMessage(f,e,s[v],s,v,t,F._dateTimeRange)),g&&(u=!0),t.showArrow=!1;break;case"maxCheckbox":e=T(f.find("input[name='"+n+"']")),g=F._getErrorMessage(f,e,s[v],s,v,t,F._maxCheckbox);break;case"minCheckbox":e=T(f.find("input[name='"+n+"']")),g=F._getErrorMessage(f,e,s[v],s,v,t,F._minCheckbox);break;case"equals":g=F._getErrorMessage(f,e,s[v],s,v,t,F._equals);break;case"funcCall":g=F._getErrorMessage(f,e,s[v],s,v,t,F._funcCall);break;case"creditCard":g=F._getErrorMessage(f,e,s[v],s,v,t,F._creditCard);break;case"condRequired":void 0!==(g=F._getErrorMessage(f,e,s[v],s,v,t,F._condRequired))&&(u=!0);break;case"funcCallRequired":void 0!==(g=F._getErrorMessage(f,e,s[v],s,v,t,F._funcCallRequired))&&(u=!0)}var _=!1;if("object"==typeof g)switch(g.status){case"_break":_=!0;break;case"_error":g=g.message;break;case"_error_no_prompt":return!0}if(0==v&&0==o.indexOf("funcCallRequired")&&void 0!==g&&(""!=l&&(l+="<br/>"),l+=g,p++,_=t.isError=!0),_)break;"string"==typeof g&&(""!=l&&(l+="<br/>"),l+=g,t.isError=!0,p++)}!u&&!e.val()&&e.val().length<1&&T.inArray("equals",s)<0&&(t.isError=!1);var C=e.prop("type"),b=e.data("promptPosition")||t.promptPosition;("radio"==C||"checkbox"==C)&&1<f.find("input[name='"+n+"']").length&&(e=T("inline"===b?f.find("input[name='"+n+"'][type!=hidden]:last"):f.find("input[name='"+n+"'][type!=hidden]:first")),t.showArrow=t.showArrowOnRadioAndCheckbox),e.is(":hidden")&&t.prettySelect&&(e=f.find("#"+t.usePrefix+F._jqSelector(e.attr("id"))+t.useSuffix)),t.isError&&t.showPrompts?F._showPrompt(e,l,d,!1,t):F._closePrompt(e),e.trigger("jqv.field.result",[e,t.isError,l]);var E=T.inArray(e[0],t.InvalidFields);return-1==E?t.isError&&t.InvalidFields.push(e[0]):t.isError||t.InvalidFields.splice(E,1),F._handleStatusCssClasses(e,t),t.isError&&t.onFieldFailure&&t.onFieldFailure(e),!t.isError&&t.onFieldSuccess&&t.onFieldSuccess(e),t.isError},_handleStatusCssClasses:function(e,t){t.addSuccessCssClassToField&&e.removeClass(t.addSuccessCssClassToField),t.addFailureCssClassToField&&e.removeClass(t.addFailureCssClassToField),t.addSuccessCssClassToField&&!t.isError&&e.addClass(t.addSuccessCssClassToField),t.addFailureCssClassToField&&t.isError&&e.addClass(t.addFailureCssClassToField)},_getErrorMessage:function(e,t,a,r,i,o,s){var n=jQuery.inArray(a,r);"custom"!==a&&"funcCall"!==a&&"funcCallRequired"!==a||(a=a+"["+r[n+1]+"]",delete r[n]);var l,d=a,u=(t.attr("data-validation-engine")?t.attr("data-validation-engine"):t.attr("class")).split(" ");if(null!=(l="future"==a||"past"==a||"maxCheckbox"==a||"minCheckbox"==a?s(e,t,r,i,o):s(t,r,i,o))){var c=F._getCustomErrorMessage(T(t),u,d,o);c&&(l=c)}return l},_getCustomErrorMessage:function(e,t,a,r){var i=!1,o=/^custom\[.*\]$/.test(a)?F._validityProp.custom:F._validityProp[a];if(null!=o&&null!=(i=e.attr("data-errormessage-"+o)))return i;if(null!=(i=e.attr("data-errormessage")))return i;var s="#"+e.attr("id");if(void 0!==r.custom_error_messages[s]&&void 0!==r.custom_error_messages[s][a])i=r.custom_error_messages[s][a].message;else if(0<t.length)for(var n=0;n<t.length&&0<t.length;n++){var l="."+t[n];if(void 0!==r.custom_error_messages[l]&&void 0!==r.custom_error_messages[l][a]){i=r.custom_error_messages[l][a].message;break}}return i||void 0===r.custom_error_messages[a]||void 0===r.custom_error_messages[a].message||(i=r.custom_error_messages[a].message),i},_validityProp:{required:"value-missing",custom:"custom-error",groupRequired:"value-missing",ajax:"custom-error",minSize:"range-underflow",maxSize:"range-overflow",min:"range-underflow",max:"range-overflow",past:"type-mismatch",future:"type-mismatch",dateRange:"type-mismatch",dateTimeRange:"type-mismatch",maxCheckbox:"range-overflow",minCheckbox:"range-underflow",equals:"pattern-mismatch",funcCall:"custom-error",funcCallRequired:"custom-error",creditCard:"pattern-mismatch",condRequired:"value-missing"},_required:function(e,t,a,r,i){switch(e.prop("type")){case"radio":case"checkbox":if(i){if(!e.prop("checked"))return r.allrules[t[a]].alertTextCheckboxMultiple;break}var o=e.closest("form, .validationEngineContainer"),s=e.attr("name");if(0==o.find("input[name='"+s+"']:checked").length)return 1==o.find("input[name='"+s+"']:visible").length?r.allrules[t[a]].alertTextCheckboxe:r.allrules[t[a]].alertTextCheckboxMultiple;break;case"text":case"password":case"textarea":case"file":case"select-one":case"select-multiple":default:var n=T.trim(e.val()),l=T.trim(e.attr("data-validation-placeholder")),d=T.trim(e.attr("placeholder"));if(!n||l&&n==l||d&&n==d)return r.allrules[t[a]].alertText}},_groupRequired:function(e,t,a,r){var i="["+r.validateAttribute+"*="+t[a+1]+"]",o=!1;if(e.closest("form, .validationEngineContainer").find(i).each(function(){if(!F._required(T(this),t,a,r))return!(o=!0)}),!o)return r.allrules[t[a]].alertText},_custom:function(e,t,a,r){var i,o=t[a+1],s=r.allrules[o];if(s)if(s.regex){var n=s.regex;if(!n)return void alert("jqv:custom regex not found - "+o);if(!new RegExp(n).test(e.val()))return r.allrules[o].alertText}else{if(!s.func)return void alert("jqv:custom type not allowed "+o);if("function"!=typeof(i=s.func))return void alert("jqv:custom parameter 'function' is no function - "+o);if(!i(e,t,a,r))return r.allrules[o].alertText}else alert("jqv:custom rule not found - "+o)},_funcCall:function(e,t,a,r){var i,o=t[a+1];if(-1<o.indexOf(".")){for(var s=o.split("."),n=window;s.length;)n=n[s.shift()];i=n}else i=window[o]||r.customFunctions[o];if("function"==typeof i)return i(e,t,a,r)},_funcCallRequired:function(e,t,a,r){return F._funcCall(e,t,a,r)},_equals:function(e,t,a,r){var i=t[a+1];if(e.val()!=T("#"+i).val())return r.allrules.equals.alertText},_maxSize:function(e,t,a,r){var i=t[a+1];if(i<e.val().length){var o=r.allrules.maxSize;return o.alertText+i+o.alertText2}},_minSize:function(e,t,a,r){var i=t[a+1];if(e.val().length<i){var o=r.allrules.minSize;return o.alertText+i+o.alertText2}},_min:function(e,t,a,r){var i=parseFloat(t[a+1]);if(parseFloat(e.val())<i){var o=r.allrules.min;return o.alertText2?o.alertText+i+o.alertText2:o.alertText+i}},_max:function(e,t,a,r){var i=parseFloat(t[a+1]);
85if(i<parseFloat(e.val())){var o=r.allrules.max;return o.alertText2?o.alertText+i+o.alertText2:o.alertText+i}},_past:function(e,t,a,r,i){var o,s=a[r+1],n=T(e.find("*[name='"+s.replace(/^#+/,"")+"']"));if("now"==s.toLowerCase())o=new Date;else if(null!=n.val()){if(n.is(":disabled"))return;o=F._parseDate(n.val())}else o=F._parseDate(s);if(o<F._parseDate(t.val())){var l=i.allrules.past;return l.alertText2?l.alertText+F._dateToString(o)+l.alertText2:l.alertText+F._dateToString(o)}},_future:function(e,t,a,r,i){var o,s=a[r+1],n=T(e.find("*[name='"+s.replace(/^#+/,"")+"']"));if("now"==s.toLowerCase())o=new Date;else if(null!=n.val()){if(n.is(":disabled"))return;o=F._parseDate(n.val())}else o=F._parseDate(s);if(F._parseDate(t.val())<o){var l=i.allrules.future;return l.alertText2?l.alertText+F._dateToString(o)+l.alertText2:l.alertText+F._dateToString(o)}},_isDate:function(e){return new RegExp(/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$|^(?:(?:(?:0?[13578]|1[02])(\/|-)31)|(?:(?:0?[1,3-9]|1[0-2])(\/|-)(?:29|30)))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(?:(?:0?[1-9]|1[0-2])(\/|-)(?:0?[1-9]|1\d|2[0-8]))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(0?2(\/|-)29)(\/|-)(?:(?:0[48]00|[13579][26]00|[2468][048]00)|(?:\d\d)?(?:0[48]|[2468][048]|[13579][26]))$/).test(e)},_isDateTime:function(e){return new RegExp(/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])\s+(1[012]|0?[1-9]){1}:(0?[1-5]|[0-6][0-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+(am|pm|AM|PM){1}$|^(?:(?:(?:0?[13578]|1[02])(\/|-)31)|(?:(?:0?[1,3-9]|1[0-2])(\/|-)(?:29|30)))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^((1[012]|0?[1-9]){1}\/(0?[1-9]|[12][0-9]|3[01]){1}\/\d{2,4}\s+(1[012]|0?[1-9]){1}:(0?[1-5]|[0-6][0-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+(am|pm|AM|PM){1})$/).test(e)},_dateCompare:function(e,t){return new Date(e.toString())<new Date(t.toString())},_dateRange:function(e,t,a,r){return!r.firstOfGroup[0].value&&r.secondOfGroup[0].value||r.firstOfGroup[0].value&&!r.secondOfGroup[0].value?r.allrules[t[a]].alertText+r.allrules[t[a]].alertText2:F._isDate(r.firstOfGroup[0].value)&&F._isDate(r.secondOfGroup[0].value)&&F._dateCompare(r.firstOfGroup[0].value,r.secondOfGroup[0].value)?void 0:r.allrules[t[a]].alertText+r.allrules[t[a]].alertText2},_dateTimeRange:function(e,t,a,r){return!r.firstOfGroup[0].value&&r.secondOfGroup[0].value||r.firstOfGroup[0].value&&!r.secondOfGroup[0].value?r.allrules[t[a]].alertText+r.allrules[t[a]].alertText2:F._isDateTime(r.firstOfGroup[0].value)&&F._isDateTime(r.secondOfGroup[0].value)&&F._dateCompare(r.firstOfGroup[0].value,r.secondOfGroup[0].value)?void 0:r.allrules[t[a]].alertText+r.allrules[t[a]].alertText2},_maxCheckbox:function(e,t,a,r,i){var o=a[r+1],s=t.attr("name");if(o<e.find("input[name='"+s+"']:checked").length)return i.showArrow=!1,i.allrules.maxCheckbox.alertText2?i.allrules.maxCheckbox.alertText+" "+o+" "+i.allrules.maxCheckbox.alertText2:i.allrules.maxCheckbox.alertText},_minCheckbox:function(e,t,a,r,i){var o=a[r+1],s=t.attr("name");if(e.find("input[name='"+s+"']:checked").length<o)return i.showArrow=!1,i.allrules.minCheckbox.alertText+" "+o+" "+i.allrules.minCheckbox.alertText2},_creditCard:function(e,t,a,r){var i=!1,o=e.val().replace(/ +/g,"").replace(/-+/g,""),s=o.length;if(14<=s&&s<=16&&0<parseInt(o)){for(var n,l=0,d=(a=s-1,1),u=new String;n=parseInt(o.charAt(a)),u+=d++%2==0?2*n:n,0<=--a;);for(a=0;a<u.length;a++)l+=parseInt(u.charAt(a));i=l%10==0}if(!i)return r.allrules.creditCard.alertText},_ajax:function(s,e,t,n){var a=e[t+1],l=n.allrules[a],r=l.extraData,i=l.extraDataDynamic,o={fieldId:s.attr("id"),fieldValue:s.val()};if("object"==typeof r)T.extend(o,r);else if("string"==typeof r){var d=r.split("&");for(t=0;t<d.length;t++){var u=d[t].split("=");u[0]&&u[0]&&(o[u[0]]=u[1])}}if(i){var c=String(i).split(",");for(t=0;t<c.length;t++){var f=c[t];if(T(f).length){var v=s.closest("form, .validationEngineContainer").find(f).val();f.replace("#",""),escape(v);o[f.replace("#","")]=v}}}if("field"==n.eventTrigger&&delete n.ajaxValidCache[s.attr("id")],!n.isError&&!F._checkAjaxFieldStatus(s.attr("id"),n))return T.ajax({type:n.ajaxFormValidationMethod,url:l.url,cache:!1,dataType:"json",data:o,field:s,rule:l,methods:F,options:n,beforeSend:function(){},error:function(e,t){n.onFailure?n.onFailure(e,t):F._ajaxError(e,t)},success:function(e){var t=e[0],a=T("#"+t).eq(0);if(1==a.length){var r=e[1],i=e[2];if(r){if(n.ajaxValidCache[t]=!0,i){if(n.allrules[i])(o=n.allrules[i].alertTextOk)&&(i=o)}else i=l.alertTextOk;n.showPrompts&&(i?F._showPrompt(a,i,"pass",!0,n):F._closePrompt(a)),"submit"==n.eventTrigger&&s.closest("form").submit()}else{var o;if(n.ajaxValidCache[t]=!1,n.isError=!0,i){if(n.allrules[i])(o=n.allrules[i].alertText)&&(i=o)}else i=l.alertText;n.showPrompts&&F._showPrompt(a,i,"",!0,n)}}a.trigger("jqv.field.result",[a,n.isError,i])}}),l.alertTextLoad},_ajaxError:function(e,t){0==e.status&&null==t?alert("The page is not served from a server! ajax call failed"):"undefined"!=typeof console&&console.log("Ajax error: "+e.status+" "+t)},_dateToString:function(e){return e.getFullYear()+"-"+(e.getMonth()+1)+"-"+e.getDate()},_parseDate:function(e){var t=e.split("-");return t==e&&(t=e.split("/")),t==e?(t=e.split("."),new Date(t[2],t[1]-1,t[0])):new Date(t[0],t[1]-1,t[2])},_showPrompt:function(e,t,a,r,i,o){e.data("jqv-prompt-at")instanceof jQuery?e=e.data("jqv-prompt-at"):e.data("jqv-prompt-at")&&(e=T(e.data("jqv-prompt-at")));var s=F._getPrompt(e);o&&(s=!1),T.trim(t)&&(s?F._updatePrompt(e,s,t,a,r,i):F._buildPrompt(e,t,a,r,i))},_buildPrompt:function(e,t,a,r,i){var o=T("<div>");switch(o.addClass(F._getClassName(e.attr("id"))+"formError"),o.addClass("parentForm"+F._getClassName(e.closest("form, .validationEngineContainer").attr("id"))),o.addClass("formError"),a){case"pass":o.addClass("greenPopup");break;case"load":o.addClass("blackPopup")}r&&o.addClass("ajaxed");T("<div>").addClass("formErrorContent").html(t).appendTo(o);var s=e.data("promptPosition")||i.promptPosition;if(i.showArrow){var n=T("<div>").addClass("formErrorArrow");if("string"==typeof s)-1!=(u=s.indexOf(":"))&&(s=s.substring(0,u));switch(s){case"bottomLeft":case"bottomRight":o.find(".formErrorContent").before(n),n.addClass("formErrorArrowBottom").html('<div class="line1">\x3c!-- --\x3e</div><div class="line2">\x3c!-- --\x3e</div><div class="line3">\x3c!-- --\x3e</div><div class="line4">\x3c!-- --\x3e</div><div class="line5">\x3c!-- --\x3e</div><div class="line6">\x3c!-- --\x3e</div><div class="line7">\x3c!-- --\x3e</div><div class="line8">\x3c!-- --\x3e</div><div class="line9">\x3c!-- --\x3e</div><div class="line10">\x3c!-- --\x3e</div>');break;case"topLeft":case"topRight":n.html('<div class="line10">\x3c!-- --\x3e</div><div class="line9">\x3c!-- --\x3e</div><div class="line8">\x3c!-- --\x3e</div><div class="line7">\x3c!-- --\x3e</div><div class="line6">\x3c!-- --\x3e</div><div class="line5">\x3c!-- --\x3e</div><div class="line4">\x3c!-- --\x3e</div><div class="line3">\x3c!-- --\x3e</div><div class="line2">\x3c!-- --\x3e</div><div class="line1">\x3c!-- --\x3e</div>'),o.append(n)}}i.addPromptClass&&o.addClass(i.addPromptClass);var l=e.attr("data-required-class");if(void 0!==l)o.addClass(l);else if(i.prettySelect&&T("#"+e.attr("id")).next().is("select")){var d=T("#"+e.attr("id").substr(i.usePrefix.length).substring(i.useSuffix.length)).attr("data-required-class");void 0!==d&&o.addClass(d)}o.css({opacity:0}
85),"inline"===s?(o.addClass("inline"),void 0!==e.attr("data-prompt-target")&&0<T("#"+e.attr("data-prompt-target")).length?o.appendTo(T("#"+e.attr("data-prompt-target"))):e.after(o)):e.before(o);var u=F._calculatePosition(e,o,i);return T("body").hasClass("rtl")?o.css({position:"inline"===s?"relative":"absolute",top:u.callerTopPosition,left:"initial",right:u.callerleftPosition,marginTop:u.marginTopSize,opacity:0}).data("callerField",e):o.css({position:"inline"===s?"relative":"absolute",top:u.callerTopPosition,left:u.callerleftPosition,right:"initial",marginTop:u.marginTopSize,opacity:0}).data("callerField",e),i.autoHidePrompt&&setTimeout(function(){o.animate({opacity:0},function(){o.closest(".formError").remove()})},i.autoHideDelay),o.animate({opacity:.87})},_updatePrompt:function(e,t,a,r,i,o,s){if(t){void 0!==r&&("pass"==r?t.addClass("greenPopup"):t.removeClass("greenPopup"),"load"==r?t.addClass("blackPopup"):t.removeClass("blackPopup")),i?t.addClass("ajaxed"):t.removeClass("ajaxed"),t.find(".formErrorContent").html(a);var n=F._calculatePosition(e,t,o);if(T("body").hasClass("rtl"))var l={top:n.callerTopPosition,left:"initial",right:n.callerleftPosition,marginTop:n.marginTopSize,opacity:.87};else l={top:n.callerTopPosition,left:n.callerleftPosition,right:"initial",marginTop:n.marginTopSize,opacity:.87};t.css({opacity:0,display:"block"}),s?t.css(l):t.animate(l)}},_closePrompt:function(e){var t=F._getPrompt(e);t&&t.fadeTo("fast",0,function(){t.closest(".formError").remove()})},closePrompt:function(e){return F._closePrompt(e)},_getPrompt:function(e){var t=T(e).closest("form, .validationEngineContainer").attr("id"),a=F._getClassName(e.attr("id"))+"formError",r=T("."+F._escapeExpression(a)+".parentForm"+F._getClassName(t))[0];if(r)return T(r)},_escapeExpression:function(e){return e.replace(/([#;&,\.\+\*\~':"\!\^$\[\]\(\)=>\|])/g,"\\$1")},isRTL:function(e){var t=T(document),a=T("body"),r=e&&e.hasClass("rtl")||e&&"rtl"===(e.attr("dir")||"").toLowerCase()||t.hasClass("rtl")||"rtl"===(t.attr("dir")||"").toLowerCase()||a.hasClass("rtl")||"rtl"===(a.attr("dir")||"").toLowerCase();return Boolean(r)},_calculatePosition:function(e,t,a){var r,i,o,s=e.width(),n=e.position().left,l=e.position().top;e.height();r=i=0,o=-t.height();var d=e.data("promptPosition")||a.promptPosition,u="",c="",f=0,v=0;switch("string"==typeof d&&-1!=d.indexOf(":")&&(u=d.substring(d.indexOf(":")+1),d=d.substring(0,d.indexOf(":")),-1!=u.indexOf(",")&&(c=u.substring(u.indexOf(",")+1),u=u.substring(0,u.indexOf(",")),v=parseInt(c),isNaN(v)&&(v=0)),f=parseInt(u),isNaN(u)&&(u=0)),d){default:case"topRight":i+=n+s-27,r+=l;break;case"topLeft":r+=l,i+=n;break;case"centerRight":r=l+4,o=0,i=n+e.outerWidth(!0)+5;break;case"centerLeft":i=n-(t.width()+2),r=l+4,o=0;break;case"bottomLeft":r=l+e.height()+5,o=0,i=n;break;case"bottomRight":i=n+s-27,r=l+e.height()+5,o=0;break;case"inline":o=r=i=0}return{callerTopPosition:(r+=v)+"px",callerleftPosition:(i+=f)+"px",marginTopSize:o+"px"}},_saveOptions:function(e,t){if(T.validationEngineLanguage)var a=T.validationEngineLanguage.allRules;else T.error("jQuery.validationEngine rules are not loaded, plz add localization files to the page");T.validationEngine.defaults.allrules=a;var r=T.extend(!0,{},T.validationEngine.defaults,t);return e.data("jqv",r),r},_getClassName:function(e){if(e)return e.replace(/:/g,"_").replace(/\./g,"_")},_jqSelector:function(e){return e.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1")},_condRequired:function(e,t,a,r){var i,o;for(i=a+1;i<t.length;i++)if((o=jQuery("#"+t[i]).first()).length&&null==F._required(o,["required"],0,r,!0))return F._required(e,["required"],0,r)},_submitButtonClick:function(e){var t=T(this);t.closest("form, .validationEngineContainer").data("jqv_submitButton",t.attr("id"))}};T.fn.validationEngine=function(e){var t=T(this);return t[0]?"string"==typeof e&&"_"!=e.charAt(0)&&F[e]?("showPrompt"!=e&&"hide"!=e&&"hideAll"!=e&&F.init.apply(t),F[e].apply(t,Array.prototype.slice.call(arguments,1))):"object"!=typeof e&&e?void T.error("Method "+e+" does not exist in jQuery.validationEngine"):(F.init.apply(t,arguments),F.attach.apply(t)):t},T.validationEngine={fieldIdCounter:0,defaults:{validationEventTrigger:"blur",scroll:!0,focusFirstField:!0,showPrompts:!0,validateNonVisibleFields:!1,ignoreFieldsWithClass:"ignoreMe",promptPosition:"topRight",bindMethod:"bind",inlineAjax:!1,ajaxFormValidation:!1,ajaxFormValidationURL:!1,ajaxFormValidationMethod:"get",onAjaxFormComplete:T.noop,onBeforeAjaxFormValidation:T.noop,onValidationComplete:!1,doNotShowAllErrosOnSubmit:!1,custom_error_messages:{},binded:!0,notEmpty:!1,showArrow:!0,showArrowOnRadioAndCheckbox:!1,isError:!1,maxErrorsPerField:!1,ajaxValidCache:{},autoPositionUpdate:!1,InvalidFields:[],onFieldSuccess:!1,onFieldFailure:!1,onSuccess:!1,onFailure:!1,validateAttribute:"class",addSuccessCssClassToField:"",addFailureCssClassToField:"",autoHidePrompt:!1,autoHideDelay:1e4,fadeDuration:300,prettySelect:!1,addPromptClass:"",usePrefix:"",useSuffix:"",showOneMessage:!1}},T(function(){T.validationEngine.defaults.promptPosition=F.isRTL()?"topLeft":"topRight"})}(jQuery);; 86/* AUTOGENERATED: custom.validationEngine.js */ 87(function(a){a.validationEngineLanguage.allRules.onlySmallLetterNumberUnder={regex:/^[a-z][0-9a-z_]+$/,alertText:"* Only small letter, digits and undescore sign are allowed"};a.validationEngineLanguage.allRules.modifier={regex:/^[\-\+]{1}([0-9]+)([\.,]([0-9]+))?([%]{1})?$/,alertText:"* Wrong format"};a.validationEngineLanguage.allRules.numberWithInfinity={regex:/^[\-\+]?((([0-9]{1,3})([,][0-9]{3})*)|([0-9]+)|\u221e)?([\.]([0-9]+))?$/,alertText:"* Wrong format"};a.validationEngineLanguage.allRules.integerWithInfinity= 88 {regex:/^[\-\+]?(\d+|\u221e)$/,alertText:"* Not a valid integer"};a.validationEngineLanguage.allRules.url={regex:/^[a-z](?:[-a-z0-9\+\.])*:(?:\/\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF!\$&'\(\)\*\+,;
88=:])*@)?(?:\[(?:(?:(?:[0-9a-f]{1,4}:){6}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|::(?:[0-9a-f]{1,4}:){5}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:[0-9a-f]{1,4}:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|v[0-9a-f]+[-a-z0-9\._~!\$&'\(\)\*\+,;=:]+)\]|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3}|(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF!\$&'\(\)\*\+,;=@])*)(?::[0-9]*)?(?:\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF!\$&'\(\)\*\+,;=:@]))*)*|\/(?:(?:(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF!\$&'\(\)\*\+,;=:@]))+)(?:\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF!\$&'\(\)\*\+,;=:@]))*)*)?|(?:(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF!\$&'\(\)\*\+,;=:@]))+)(?:\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF!\$&'\(\)\*\+,;=:@]))*)*|(?!(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF!\$&'\(\)\*\+,;=:@])))(?:\?(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF!\$&'\(\)\*\+,;=:@])|[\/\?])*)?$/i, 89 alertText:"* Invalid URL"};a.validationEngineLanguage.allRules.phone={regex:/^([\+]?[\d]{1,3})?(?:\s*[ \(]([\d]{2,6})[ \)])?\s*([\d \.\-\/]{3,20})\s*(?:x|ext|extension|,)?\s*([\d]{1,4})?$/,alertText:"* Wrong number format"};a.validationEngineLanguage.allRules.email={func:function(field,rules,i,options){field.val(a.trim(field.val()));var customRule=rules[i+1];var rule=options.allrules[customRule];var pattern=new RegExp(rule.regex_old);return pattern.test(field.val())}
vendor: 4,183 bytes, lines 89-129
89,regex:null,regex_old:a.validationEngineLanguage.allRules.email.regex,alertText:a.validationEngineLanguage.allRules.email.alertText}})(jQuery);; 90/* AUTOGENERATED: jquery.mousewheel.min.js */ 91/*! 92 * jQuery Mousewheel 3.1.13 93 * 94 * Copyright 2015 jQuery Foundation and other contributors 95 * Released under the MIT license. 96 * http://jquery.org/license 97 */ 98!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});; 99/* AUTOGENERATED: regex-mask-plugin.js */ 100/* vim: set ts=2 sw=2 sts=2 et: */ 101 102/** 103 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 104 * See https://www.x-cart.com/license-agreement.html for license details. 105 */ 106 107(function ($){ 108 $.fn.regexMask = function (mask) { 109 if (!mask) { 110 throw 'mandatory mask argument missing'; 111 } else if (mask == 'float-ptbr') { 112 mask = /^((\d{1,3}(\.\d{3})*(((\.\d{0,2}))|((\,\d*)?)))|(\d+(\,\d*)?))$/; 113 } else if (mask == 'float-enus') { 114 mask = /^((\d{1,3}(\,\d{3})*(((\,\d{0,2}))|((\.\d*)?)))|(\d+(\.\d*)?))$/; 115 } else if (mask == 'integer') { 116 mask = /^\d+$/; 117 } else { 118 try { 119 mask.test(""); 120 } catch(e) { 121 throw 'mask regex need to support test method'; 122 } 123 } 124 $(this).keypress(function (event) { 125 if (!event.charCode) return true; 126 var part1 = this.value.substring(0,this.selectionStart); 127 var part2 = this.value.substring(this.selectionEnd,this.value.length); 128 if (!mask.test(part1 + String.fromCharCode(event.charCode) + part2)) 129 return false;
130 }); 131 }; 132})(jQuery);; 133/* AUTOGENERATED: common.js */ 134/* vim: set ts=2 sw=2 sts=2 et: */ 135 136/** 137 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 138 * See https://www.x-cart.com/license-agreement.html for license details. 139 */ 140 141var URLHandler = { 142 143 excluded: { 144 'base': true 145 }, 146 baseURLPart: '', 147 querySeparator: '?', 148 argSeparator: '&', 149 nameValueSeparator: '=', 150 151 // Return query param 152 getParamValue: function (name, params) { 153 return name 154 + this.nameValueSeparator 155 + encodeURIComponent(typeof params[name] === 'boolean' ? Number(params[name]) : params[name]); 156 }, 157 158 // Get param value for the remained params 159 getQueryParamValue: function (name, params) { 160 return URLHandler.getParamValue(name, params); 161 }, 162 163 // Build HTTP query 164 implodeParams: function (params, method) { 165 result = ''; 166 isStarted = false; 167 168 for (x in params) { 169 170 if (isStarted) { 171 result += this.argSeparator; 172 } else { 173 isStarted = true; 174 } 175 176 result += method(x, params); 177 } 178 179 return result; 180 }, 181 182 // Implode remained params 183 implodeQueryParams: function (params) { 184 return this.implodeParams(params, this.getQueryParamValue); 185 }, 186 187 // Unset some params 188 clearParams: function (params, excluded) { 189 // clone object 190 var result = {}; 191 192 for (key in params) { 193 if (params[key] !== undefined && params[key] !== null && !(key in excluded)) { 194 result[key] = params[key]; 195 } 196 } 197 198 return result; 199 }, 200 201 preprocessParams: function (params) { 202 return this.clearParams(params, this.excluded); 203 }, 204 205 // Get base url 206 buildBaseUrl: function (params) { 207 var base = params.base || this.baseURLPart; 208 209 if (xliteConfig.clean_url && base === xliteConfig.clean_urls_base) { 210 return ''; 211 } 212 213 return params.base || this.baseURLPart; 214 }, 215 216 // Compose query params 217 buildQueryParams: function (params) { 218 return this.querySeparator + this.implodeQueryParams(this.preprocessParams(params)); 219 }, 220 221 getBuildURLPrefix: function (params) { 222 return xliteConfig.ajax_prefix && !(params && params.base === xliteConfig.admin_script) 223 ? (xliteConfig.ajax_prefix + '/') 224 : ''; 225 }, 226 227 // Compose URL 228 buildURL: function (params) { 229 return this.getBuildURLPrefix(params) + this.buildBaseUrl(params) + this.buildQueryParams(params); 230 } 231}; 232 233// Dialog 234 235// Abstract open dialog 236function openDialog(selector, additionalOptions) { 237 additionalOptions = additionalOptions || {}; 238 239 var box = jQuery(selector); 240 241 _.each( 242 ['h2', 'h1'], 243 function (tag) { 244 var elm = box.find(tag); 245 if ('undefined' == typeof(additionalOptions.title) || !additionalOptions.title) { 246 additionalOptions.title = elm.html(); 247 } 248 elm.remove(); 249 } 250 ); 251 252 popup.isLoading = false; 253 return popup.open(jQuery(selector), additionalOptions); 254} 255 256// Loadable dialog 257function loadDialog(url, dialogOptions, callback, link, $this) { 258 openWaitBar(); 259 260 var selector = 'tmp-dialog-' + (new Date()).getTime() + '-' + jQuery(link).attr('class').toString().replace(/[ \.]/g, '-'); 261 262 xcart.get( 263 url, 264 function (xhr, status, data) { 265 if (data) { 266 var div = jQuery(document.body.appendChild(document.createElement('div'))).hide(); 267 268 var uuid = _.uniqueId(); 269 270 xcart.bind(['resources.ready', 'resources.empty'], _.bind( 271 function (event, args) { 272 if (args.uuid === uuid) { 273 if (1 == div.get(0).childNodes.length) { 274 div = jQuery(div.get(0).childNodes[0]); 275 } 276 277 // Specific CSS class to manage this specific popup window 278 div.addClass(selector); 279 280 // Every popup window (even hidden one) has this one defined CSS class. 281 // You should use this selector to manage any popup window entry. 282 div.addClass('popup-window-entry'); 283 284 openDialog('.' + selector, dialogOptions); 285 286 if (callback) { 287 callback.call($this, '.' + selector, link); 288 } 289 } 290 }, 291 this) 292 ); 293 294 div.html(jQuery.trim(data)); 295 296 xcart.parsePreloadedLabels(div, uuid); 297 xcart.parseResources(div, uuid); 298 } 299 } 300 ); 301 302 return '.' + selector; 303} 304 305// Load dialog by link 306function loadDialogByLink(link, url, options, callback, $this) { 307 if (!link.linkedDialog || 0 == jQuery(link.linkedDialog).length || jQuery(link).hasClass('always-reload')) { 308 link.linkedDialog = loadDialog(url, options, callback, link, $this); 309 310 } else { 311 openDialog(link.linkedDialog, options, callback); 312 } 313} 314 315function openWaitBar() { 316 popup.openAsWait(); 317} 318 319function closeWaitBar() { 320 popup.close(); 321} 322 323// Check for the AJAX support 324function hasAJAXSupport() { 325 if (typeof(window.ajaxSupport) == 'undefined') { 326 window.ajaxSupport = false;
327 try { 328 329 var xhr = window.ActiveXObject ? new ActiveXObject('Microsoft.XMLHTTP') : new XMLHttpRequest(); 330 window.ajaxSupport = xhr ? true : false; 331 332 } catch (e) { 333 } 334 } 335 336 return window.ajaxSupport; 337} 338 339// Check list of checkboxes 340function checkMarks(form, reg, lbl) { 341 var is_exist = false; 342 343 if (!form || form.elements.length == 0) 344 return true; 345 346 for (var x = 0; x < form.elements.length; x++) { 347 if ( 348 form.elements[x].type == 'checkbox' 349 && form.elements[x].name.search(reg) == 0 350 && !form.elements[x].disabled 351 ) { 352 is_exist = true; 353 354 if (form.elements[x].checked) 355 return true; 356 } 357 } 358 359 if (!is_exist) 360 return true; 361 362 if (lbl) { 363 alert(lbl); 364 365 } else if (lbl_no_items_have_been_selected) { 366 alert(lbl_no_items_have_been_selected); 367 368 } 369 370 return false; 371} 372 373/* 374 Parameters: 375 checkboxes - array of tag names 376 checkboxes_form - form name with these checkboxes 377 */ 378function change_all(flag, formname, arr) { 379 if (!formname) 380 formname = checkboxes_form; 381 if (!arr) 382 arr = checkboxes; 383 if (!document.forms[formname] || arr.length == 0) 384 return false; 385 for (var x = 0; x < arr.length; x++) { 386 if (arr[x] != '' && document.forms[formname].elements[arr[x]] && !document.forms[formname].elements[arr[x]].disabled) { 387 document.forms[formname].elements[arr[x]].checked = flag; 388 if (document.forms[formname].elements[arr[x]].onclick) 389 document.forms[formname].elements[arr[x]].onclick(); 390 } 391 } 392} 393 394function checkAll(flag, form, prefix) { 395 if (!form) { 396 return; 397 } 398 399 if (prefix) { 400 var reg = new RegExp('^' + prefix, ''); 401 } 402 for (var i = 0; i < form.elements.length; i++) { 403 if ( 404 form.elements[i].type == "checkbox" 405 && (!prefix || form.elements[i].name.search(reg) == 0) 406 && !form.elements[i].disabled 407 ) { 408 form.elements[i].checked = flag; 409 } 410 } 411} 412 413/* 414 Opener/Closer HTML block 415 */ 416function visibleBox(id, skipOpenClose) { 417 var elm1 = document.getElementById('open' + id); 418 var elm2 = document.getElementById('close' + id); 419 var elm3 = document.getElementById('box' + id); 420 421 if (!elm3) { 422 return false; 423 } 424 425 if (skipOpenClose) { 426 elm3.style.display = (elm3.style.display == '') ? 'none' : ''; 427 428 } else if (elm1) { 429 if (elm1.style.display == '') { 430 elm1.style.display = 'none'; 431 432 if (elm2) { 433 elm2.style.display = ''; 434 } 435 436 elm3.style.display = 'none'; 437 jQuery('.DialogBox').css('height', '1%'); 438 439 } else { 440 elm1.style.display = ''; 441 if (elm2) { 442 elm2.style.display = 'none'; 443 } 444 445 elm3.style.display = ''; 446 } 447 } 448 449 return true; 450} 451 452/** 453 * Attach tooltip to some element on hover action 454 */ 455function attachTooltip(elm, content, forcePlacement, ttl) { 456 var placement = 'right'; 457 458 elm = jQuery(elm); 459 460 if ( 461 elm.length 462 && ( 463 (jQuery(window).width() - elm.offset().left) < 200 464 || ( 465 elm.parents('.ui-dialog').length 466 && (elm.parents('.ui-dialog').offset().left + elm.parents('.ui-dialog').width() - elm.offset().left) < 200 467 ) 468 ) 469 ) { 470 placement = 'left'; 471 } 472 placement = forcePlacement || placement; 473 474 jQuery(elm).each( 475 function () { 476 if (isBootstrapUse()) { 477 478 if ('undefined' == typeof(this.tooltipAssigned) || !this.tooltipAssigned) { 479 480 var to; 481 var obj = jQuery(this); 482 if (undefined === ttl) { 483 ttl = 500; 484 } 485 ; 486 487 var options = { 488 html: true, 489 title: content, 490 placement: placement, 491 trigger: 'manual' 492 }; 493 494 if (elm.data('container')) { 495 options['container'] = elm.data('container'); 496 } else if (elm.parents('.ui-dialog').length > 0) { 497 options['container'] = '.ui-dialog'; 498 } 499 ; 500 obj.tooltip(options); 501 502 obj.mouseover( 503 function () { 504 if (to) { 505 clearTimeout(to); 506 to = null; 507 } 508 if (!obj.next('.tooltip').length) { 509 jQuery(this).tooltip('show'); 510 } 511 } 512 ); 513 514 obj.mouseout( 515 function () { 516 to = setTimeout( 517 function () { 518 obj.tooltip('hide'); 519 }, 520 ttl 521 ); 522 } 523 ); 524 525 obj.on( 526 'shown.bs.tooltip', 527 function (event) { 528 var next = jQuery(event.currentTarget).next(); 529 if ('undefined' == typeof(next.get(0).tooltipAssigned) || !next.get(0).tooltipAssigned) { 530 next 531 .mouseover(function () { 532 obj.mouseover(); 533 }) 534 .mouseout(function () { 535 obj.mouseout(); 536 }); 537 next.get(0).tooltipAssigned = true; 538 } 539 } 540 ); 541 542 this.tooltipAssigned = true; 543 544 } 545 546 } else { 547 jQuery(this).tooltip({ 548 items: this, 549 'content': content 550 }); 551 552 } 553 554 jQuery(document).on('click', '.tooltip-main .tooltip', function (evt) { 555 return false;
556 }); 557 558 jQuery(document).on('click', '.tooltip-main .tooltip a', function (evt) { 559 evt.stopPropagation(); 560 }); 561 } 562 ); 563} 564 565/** 566 * Wait overlay 567 */ 568 569function assignWaitOverlay(elem) { 570 return createOverlay(elem, 'wait'); 571} 572 573function unassignWaitOverlay(elem, force) { 574 return removeOverlay(elem, force); 575} 576 577/** 578 * Shade overlay 579 */ 580 581function assignShadeOverlay(elem) { 582 return createOverlay(elem, 'shade'); 583} 584 585function unassignShadeOverlay(elem, force) { 586 return removeOverlay(elem, force); 587} 588 589var overlayRegistry = {}; 590var overlayAttr = 'data-overlay-id'; 591 592function getOverlaySelector (elem) { 593 return elem.attr(overlayAttr) || generateOverlayId(); 594} 595 596function generateOverlayId() { 597 do { 598 var pattern = 'overlay-' + Math.round(Math.random() * 1000000); 599 var isUnique = $('[' + overlayAttr + '=' + pattern + ']').length === 0; 600 } while (!isUnique); 601 602 return pattern; 603} 604 605function createOverlay(elem, type) { 606 type = type || 'wait'; 607 var pattern = getOverlaySelector(elem); 608 609 $.each(elem, function() { 610 var elem = $(this); 611 612 if (!_.isUndefined(this.overlay) && this.overlay) { 613 unassignWaitOverlay(elem); 614 } 615 616 var overlayElement = null; 617 if (type === 'wait') { 618 overlayElement = jQuery('<div class="wait-block-overlay"><div class="wait-block"><div></div></div></div>'); 619 } else { 620 overlayElement = jQuery('<div class="shade-block-overlay"></div>'); 621 } 622 623 overlayElement.css({ 624 width: elem.outerWidth() + 'px', 625 height: elem.outerHeight() + 'px' 626 }); 627 628 // We do not show the overlay if the element has zero width or height (the element is not visible) 629 if (0 !== elem.outerWidth() && 0 !== elem.outerHeight()) { 630 elem.prepend(overlayElement) 631 } 632 633 var leftOffset = elem.offset().left - overlayElement.offset().left; 634 var topOffset = elem.offset().top - overlayElement.offset().top; 635 overlayElement.css('margin-left', leftOffset + 'px'); 636 overlayElement.css('margin-top', topOffset + 'px'); 637 638 overlayElement.attr('id', pattern); 639 elem.attr(overlayAttr, pattern); 640 overlayRegistry[pattern] = overlayElement; 641 this.overlay = overlayElement; 642 643 elem.trigger('assignOverlay', {widget: elem, type: type}); 644 }); 645 646 return $('#' + pattern); 647} 648 649function removeOverlay(elem, force) { 650 var pattern = getOverlaySelector(elem); 651 652 $.each(elem, function() { 653 var elem = $(this); 654 655 var overlay = null; 656 if (pattern && typeof overlayRegistry[pattern] !== "undefined") { 657 overlay = overlayRegistry[pattern]; 658 } else if (force) { 659 overlay = $('.wait-block-overlay, .shade-block-overlay'); 660 } 661 662 if (overlay) { 663 overlay.remove(); 664 elem.attr(overlayAttr, null); 665 elem.trigger('unassignOverlay', {widget: elem}); 666 this.overlay = null; 667 } 668 }); 669} 670 671function isBootstrapUse() { 672 return 'undefined' != typeof(jQuery.fn.modal) 673 && _.isFunction(jQuery.fn.modal); 674} 675 676/** 677 * State widget specific objects and methods (used in select_country.js ) 678 */ 679 680var StatesList = (function () { 681 var instance; 682 683 function createInstance() { 684 function StatesListProto() { 685 } 686 687 extend(StatesListProto, Object); 688 689 StatesListProto.states = []; 690 StatesListProto.stateSelectors = []; 691 StatesListProto.forceCustomState = false; 692 StatesListProto.forceCustomStateCountries = []; 693 694 StatesListProto.prototype.addStates = function (states) { 695 StatesListProto.states = array_merge(this.states, states); 696 return this; 697 }; 698 699 StatesListProto.prototype.getStates = function (country) { 700 return StatesListProto.states[country]; 701 }; 702 703 StatesListProto.prototype.getAllStates = function () { 704 return StatesListProto.states; 705 }; 706 707 StatesListProto.prototype.getStatesArray = function (country) { 708 var extractStates = function (state) { 709 if (state instanceof Object) { 710 if (!_.isUndefined(state.name)) { 711 return [state.name]; 712 } 713 714 var result = []; 715 716 if (state instanceof Array) { 717 state.map(function (v) { 718 result = result.concat(extractStates(v)); 719 }); 720 } else { 721 Object.keys(state).forEach(function (key) { 722 result = result.concat(extractStates(state[key])); 723 }); 724 } 725 726 return result.sort(function (a, b) { 727 return a.toLowerCase().localeCompare(b.toLowerCase()); 728 }); 729 } 730 731 return []; 732 }; 733 734 return extractStates(this.getStates(country)); 735 }; 736 737 StatesListProto.prototype.addStateSelector = function (fieldId, stateSelector) { 738 StatesListProto.stateSelectors[fieldId] = stateSelector; 739 return this; 740 }; 741 742 StatesListProto.prototype.getStateSelectors = function () { 743 return StatesListProto.stateSelectors; 744 }; 745 746 StatesListProto.prototype.isForceCustomState = function (country) { 747 return StatesListProto.forceCustomState 748 || StatesListProto.forceCustomStateCountries.indexOf(country) != -1; 749 }; 750 751 StatesListProto.prototype.updateStatesList = function (base) { 752 var _stateSelectors, _forceCustomState, o = this; 753 754 base = base || document; 755 756 if (!jQuery('.country-selector', base).length) { 757 o.addStates(window.statesList); 758 } else { 759 jQuery('.country-selector', base).each(function (index, elem) { 760 o.addStates(xcart.getCommentedData(elem, 'statesList')); 761 _forceCustomState = xcart.getCommentedData(elem, 'forceCustomState'); 762 _stateSelectors = xcart.getCommentedData(elem, 'stateSelectors'); 763 764 if (_forceCustomState instanceof Array) { 765 if (_forceCustomState.indexOf('All') != -1) { 766 StatesListProto.forceCustomState = true; 767 _forceCustomState.splice(_forceCustomState.indexOf('All'), 1); 768 } 769 770 StatesListProto.forceCustomStateCountries = array_merge( 771 StatesListProto.forceCustomStateCountries, 772 _forceCustomState 773 ); 774 } 775 776 if (_stateSelectors) { 777 o.addStateSelector(_stateSelectors.fieldId, new StateSelector( 778 _stateSelectors.fieldId, 779 _stateSelectors.stateSelectorId, 780 _stateSelectors.stateInputId 781 )); 782 } 783 }); 784 } 785 }; 786 787 return new StatesListProto; 788 } 789 790 return { 791 getInstance: function () { 792 if (!instance) { 793 instance = createInstance(); 794 795 instance.updateStatesList(); 796 } 797 return instance; 798 } 799 }; 800})(); 801 802function setPriceElement(element, value, e) { 803 e = e || 2; 804 805 var str = xcart.numberToString(value, '.', '', e); 806 var parts = str.split('.'); 807 808 // Sign 809 if (!element.find('.part-sign').length) { 810 if (!element.find('.part-prefix').length) { 811 element.find('.part-integer').before('<span class="part-sign"></span>'); 812 813 } else { 814 element.find('.part-prefix').before('<span class="part-sign"></span>'); 815 } 816 } 817 if (value >= 0) { 818 element.find('.part-sign').html(''); 819 820 } else { 821 element.find('.part-sign').html('− '); 822 } 823 824 element.find('.part-integer').html(Math.abs(parseInt(parts[0]))); 825 if (parts[1]) { 826 element.find('.part-decimal').html(parts[1]); 827 828 } else { 829 element.find('.part-decimal').html(''); 830 } 831} 832 833function CacheEngine() { 834 this.cache = []; 835} 836 837CacheEngine.prototype.add = function (key, value) { 838 var updated = false;
839 840 for (var i = 0; i < this.cache.length; i++) { 841 if (this.cache[i].key === key) { 842 updated = true; 843 this.cache[i].value = value; 844 845 break; 846 } 847 } 848 849 if (!updated) { 850 this.cache.push({key: key, value: value}); 851 } 852}; 853 854CacheEngine.prototype.get = function (key) { 855 for (var i = 0; i < this.cache.length; i++) { 856 if (this.cache[i].key === key) { 857 return this.cache[i].value; 858 } 859 } 860}; 861 862CacheEngine.prototype.has = function (key) { 863 for (var i = 0; i < this.cache.length; i++) { 864 if (this.cache[i].key === key) { 865 return true; 866 } 867 } 868}; 869 870CacheEngine.prototype.remove = function (key) { 871 var index = null; 872 873 for (var i = 0; i < this.cache.length; i++) { 874 if (this.cache[i].key === key) { 875 index = i; 876 877 break; 878 } 879 } 880 881 this.cache.splice(index, 1); 882}; 883 884CacheEngine.prototype.clear = function () { 885 this.cache = []; 886}; 887 888function getPasswordDifficulty(password) { 889 var digits = new RegExp('\\d'); 890 891 var lowerLetters, upperLetters, specials; 892 try { 893 lowerLetters = new RegExp('\\p{Ll}', 'u'); 894 upperLetters = new RegExp('\\p{Lu}', 'u'); 895 specials = new RegExp('[^\\d\\p{L}]', 'u'); 896 } catch (e) { 897 console.log("Current browser doesn't support regular expressions with unicode"); 898 lowerLetters = new RegExp('[a-z]'); 899 upperLetters = new RegExp('[A-Z]'); 900 specials = new RegExp('[^A-Za-z\\d]'); 901 } 902 903 var rating = 0; 904 [digits, lowerLetters, upperLetters, specials].forEach(function(item) { 905 if (item.test(password)) { 906 rating++; 907 } 908 }); 909 910 if (password.length >= 6) { 911 rating++; 912 } 913 914 if (rating < 3) { 915 return 'Weak password'; 916 } 917 918 return (rating < 4) ? 'Good password' : 'Strong password'; 919} 920 921function showPasswordDifficultyMessage(elem, difficulty) { 922 elem.html(xcart.t(difficulty)); 923} 924 925function setPasswordDifficultyColor(elem, difficulty) { 926 if (difficulty == 'Weak password') { 927 elem.css("color", "#D4142C"); 928 } else if (difficulty == 'Good password') { 929 elem.css("color", "#A66908"); 930 } else if (difficulty == 'Strong password') { 931 elem.css("color", "#598103"); 932 } 933} 934 935function smartTrim(string, maxLength) { 936 if (string.length <= maxLength) { 937 return string; 938 } 939 940 if (maxLength == 1) { 941 return string.substring(0,1) + '...'; 942 } 943 944 const midpoint = Math.ceil(string.length / 2); 945 const toremove = string.length - maxLength; 946 const lstrip = Math.ceil(toremove/2); 947 const rstrip = toremove - lstrip; 948 949 return string.substring(0, midpoint-lstrip) + '...' 950 + string.substring(midpoint+rstrip); 951}; 952 953jQuery(document).ready( 954 function () { 955 var isIE11 = !!navigator.userAgent.match(/Trident.*rv[ :]*11\./); 956 957 if (isIE11) { 958 jQuery('body').addClass('ie11'); 959 } 960 961 // Open warning popup 962 xcart.microhandlers.add( 963 'OverlayHeightResize', 964 '>*:first', 965 function (event) { 966 jQuery('.ui-widget-overlay').css('height', jQuery(document).height()); 967 jQuery('.ui-widget-overlay').css('width', jQuery('body').innerWidth()); 968 } 969 ); 970 971 xcart.microhandlers.add( 972 'PopupModelButtonWidthFix', 973 '.model-form-buttons', 974 function (event) { 975 jQuery('.ajax-container-loadable .model-form-buttons') 976 .each(function (index, elem) { 977 jQuery('.button', elem).width(jQuery(elem).width()); 978 }); 979 } 980 ); 981 982 xcart.microhandlers.add( 983 'promo-close', 984 '.promo-block .close', 985 function (event) { 986 $(this).click(function () { 987 var block = jQuery(this).parents('.promo-block').get(0); 988 var blockId = jQuery(block).data('promo-id'); 989 if (0 < blockId.length) { 990 blockId = blockId + 'PromoBlock'; 991 document.cookie = blockId + '=1'; 992 } 993 jQuery(block).hide(); 994 }); 995 } 996 ); 997 998 xcart.microhandlers.add( 999 'promo-close-2', 1000 '.promo-block-close', 1001 function (event) { 1002 $(this).click(function () { 1003 var blockSelector = jQuery(this).data('promo-selector'); 1004 var block = null; 1005 1006 if (blockSelector) { 1007 block = jQuery(blockSelector); 1008 } else { 1009 block = jQuery(this).parents('.promo-block').get(0) 1010 } 1011 1012 var blockId = jQuery(block).data('promo-id'); 1013 if (0 < blockId.length) { 1014 blockId = blockId + 'PromoBlock'; 1015 document.cookie = blockId + '=1'; 1016 } 1017 jQuery(block).hide(); 1018 }); 1019 } 1020 ); 1021 1022 xcart.microhandlers.add( 1023 'promo-close-2', 1024 'input.column-selector', 1025 function (event) { 1026 $(this).click(function () { 1027 if (!this.columnSelectors) { 1028 var idx = jQuery(this).parents('th').get(0).cellIndex; 1029 var table = jQuery(this).parents('table').get(0); 1030 this.columnSelectors = jQuery('tr', table) 1031 .find('td') 1032 .eq(idx) 1033 .find(':checkbox'); 1034 } 1035 1036 this.columnSelectors.prop('checked', this.checked ? 'checked' : ''); 1037 }); 1038 } 1039 ); 1040 1041 xcart.microhandlers.add( 1042 'input-file', 1043 'input.inputfile', 1044 function (event) { 1045 $(this).change(function () { 1046 if (this.files) { 1047 var filename = ''; 1048 if (this.files.length > 1) { 1049 filename = this.files.length + " files selected"; 1050 } else { 1051 filename = this.files[0].name; 1052 } 1053 1054 const filenameElement = $(this).siblings('span.input-filename'); 1055 if (filename) { 1056 filename = filename 1057 .replace(/&/g, "&") 1058 .replace(/</g, "<") 1059 .replace(/>/g, ">") 1060 .replace(/"/g, """) 1061 .replace(/'/g, "'"); 1062 filenameElement.html(smartTrim(filename, 20)); 1063 } 1064 } 1065 }); 1066 } 1067 ); 1068 1069 1070 if (xliteConfig.zone === 'customer') { 1071 xcart.microhandlers.add( 1072 '.profile-form', 1073 'input#password', 1074 function (event) { 1075 $(this) 1076 .last() 1077 .on('input', function () { 1078 var difficulty = getPasswordDifficulty($(this).val()); 1079 1080 var form = $(this).closest('form'); 1081 var formId = form.attr('id') 1082 var passwordDifficultyElem = $(".password-difficulty[form-id=" + formId + "]"); 1083 1084 if (passwordDifficultyElem.length == 0) { 1085 form.find('.password-label').append( 1086 "<span class='password-difficulty' form-id='" + formId + "'></span>" 1087 ); 1088 passwordDifficultyElem = $(".password-difficulty[form-id=" + formId + "]"); 1089 } 1090 1091 1092 showPasswordDifficultyMessage(passwordDifficultyElem, difficulty); 1093 setPasswordDifficultyColor(passwordDifficultyElem, difficulty); 1094 }); 1095 } 1096 ); 1097 } 1098 1099 xcart.bind('popup.open', function () { 1100 jQuery('html').addClass('popup-opened'); 1101 }); 1102 xcart.bind('popup.close', function () { 1103 jQuery('html').removeClass('popup-opened'); 1104 }); 1105 });; 1106/* AUTOGENERATED: xcart.element.js */ 1107/* vim: set ts=2 sw=2 sts=2 et: */ 1108 1109/** 1110 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 1111 * See https://www.x-cart.com/license-agreement.html for license details. 1112 */ 1113 1114Element.prototype.fireEvent = Window.prototype.fireEvent = function fireEvent(event, eventInterface) { 1115 eventInterface = eventInterface || 'Event'; 1116 emitEvent(this, event, eventInterface); 1117}; 1118 1119function emitEvent(object, event, eventInterface) { 1120 if (document.createEventObject) { 1121 // dispatch for IE 1122 var evt = document.createEventObject(); 1123 return object.fireEvent('on' + event, evt); 1124 } else { 1125 // dispatch for firefox + others 1126 eventInterface = eventInterface || 'Event'; 1127 var evt = document.createEvent(eventInterface); 1128 evt.initEvent(event, true, true); // event type,bubbling,cancelable 1129 return !object.dispatchEvent(evt); 1130 } 1131}; 1132/* AUTOGENERATED: xcart.js */ 1133/* vim: set ts=2 sw=2 sts=2 et: */ 1134 1135/** 1136 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 1137 * See https://www.x-cart.com/license-agreement.html for license details. 1138 */ 1139 1140/** 1141 * OOP core 1142 */ 1143 1144// OOP extends emulation 1145function extend(child, parent) { 1146 var F = function () { 1147 }; 1148 F.prototype = parent.prototype; 1149 child.prototype = new F(); 1150 child.prototype.constructor = child; 1151 child.superclass = parent.prototype; 1152 1153 child.prototype.inherit_stack = child.prototype.inherit_stack === undefined 1154 ? [] 1155 : child.prototype.inherit_stack.slice(0); 1156 child.prototype.inherit_stack.push(parent); 1157} 1158 1159// Decorate / add method 1160function decorate(c, methodName, method) { 1161 c = getClassByName(c); 1162 1163 var result = false;
1164 1165 if (c) { 1166 method.previousMethod = 'undefined' == typeof (c.prototype[methodName]) ? null : c.prototype[methodName]; 1167 c.prototype[methodName] = method; 1168 result = true; 1169 } 1170 1171 return result; 1172} 1173 1174// Get class object by name (or object) 1175function getClassByName(c) { 1176 if (c && c.constructor == String) { 1177 c = eval('(("undefined" != typeof(window.' + c + ') && ' + c + '.constructor == Function) ? ' + c + ' : null)'); 1178 1179 } else if (!c || c.constructor != Function) { 1180 c = null; 1181 } 1182 1183 return c; 1184} 1185 1186// Base class 1187function Base() { 1188 this.triggerVent('initialize'); 1189} 1190 1191// Call parent method by name nad arguments list 1192Base.prototype.callSupermethod = function (name, args) { 1193 var call_stack_head = false; 1194 this.call_stack = this.call_stack === undefined ? {} : this.call_stack; 1195 if (!this.call_stack.hasOwnProperty(name) || this.call_stack[name] === undefined) { 1196 call_stack_head = true; 1197 this.call_stack[name] = this.inherit_stack.slice(0); 1198 } 1199 1200 var superClass = this.call_stack[name].pop(); 1201 var result = (name === 'constructor' ? superClass : superClass.prototype[name]).apply(this, args); 1202 this.call_stack[name].push(superClass); 1203 1204 if (call_stack_head) { 1205 this.call_stack[name] = undefined; 1206 } 1207 1208 return result; 1209}; 1210 1211// Bind event handler 1212Base.prototype.bind = function (name, handler) { 1213 jQuery(this).bind(name, handler); 1214 1215 return this; 1216}; 1217 1218// Unbind event handler 1219Base.prototype.unbind = function (name, handler) { 1220 jQuery(this).unbind(name, handler); 1221 1222 return this; 1223}; 1224 1225// Trigger event on common mediator object 1226Base.prototype.triggerVent = function (name, data) { 1227 var ns = this.getEventNamespace(); 1228 if (ns) { 1229 xcart.trigger(ns + '.' + name, data); 1230 } 1231 1232 return jQuery(this).trigger('local.' + name, data); 1233}; 1234 1235// Get event namespace (prefix) 1236Base.prototype.getEventNamespace = function () { 1237 return null; 1238}; 1239 1240var reverseArguments = function (func) { 1241 return function () { 1242 return func.apply(this, Array.prototype.reverse.call(arguments)); 1243 }; 1244}; 1245 1246// Core definition 1247window.xcart = { 1248 1249 isDebug: false, 1250 1251 isReady: false, 1252 1253 isRequesterEnabled: false, 1254 1255 savedEvents: [], 1256 1257 messages: jQuery({}), 1258 1259 resources: [], 1260 1261 resourcesCacheTimestamp: '', 1262 1263 htmlResourcesLoadDeferred: new $.Deferred(), 1264 1265 // Collections of the getters which return the parameters of the widgets to get via widgets collection process 1266 widgetsParamsGetters: {}, 1267 1268 doShadeWidgetsCollection: true, 1269 1270 xhrMiddlewares: [], 1271 1272 getXhrMiddlewares: function () { 1273 return [ 1274 this.processBackendEvents 1275 ].concat(this.xhrMiddlewares); 1276 }, 1277 1278 addXhrMiddleware: function (callback) { 1279 this.xhrMiddlewares.push(callback); 1280 }, 1281 1282 registerWidgetsParamsGetter: function (widgetsId, getter) { 1283 if (!this.widgetsParamsGetters[widgetsId]) { 1284 this.widgetsParamsGetters[widgetsId] = []; 1285 } 1286 this.widgetsParamsGetters[widgetsId].push(getter); 1287 }, 1288 1289 getWidgetsParams: function (widgetsId, paramsToCall) { 1290 var params = []; 1291 for (var key in this.widgetsParamsGetters[widgetsId]) { 1292 params = array_merge(params, this.widgetsParamsGetters[widgetsId][key](paramsToCall)); 1293 } 1294 return params; 1295 }, 1296 1297 widgetsTriggers: {}, 1298 1299 registerWidgetsTriggers: function (widgetsId, triggersGetter) { 1300 if (!this.widgetsTriggers[widgetsId]) { 1301 this.widgetsTriggers[widgetsId] = []; 1302 } 1303 this.widgetsTriggers[widgetsId].push(triggersGetter); 1304 }, 1305 1306 getWidgetsTriggers: function (widgetsId) { 1307 var triggers = []; 1308 for (var key in this.widgetsTriggers[widgetsId]) { 1309 triggers.push(this.widgetsTriggers[widgetsId][key]()); 1310 } 1311 return triggers; 1312 }, 1313 1314 shadowWidgets: {}, 1315 1316 registerShadowWidgets: function (widgetsId, shadowGetter) { 1317 if ('undefined' === typeof (this.shadowWidgets[widgetsId])) { 1318 this.shadowWidgets[widgetsId] = []; 1319 } 1320 this.shadowWidgets[widgetsId].push(shadowGetter); 1321 }, 1322 1323 getShadowWidgets: function (widgetsId) { 1324 var shadow = []; 1325 for (var key in this.shadowWidgets[widgetsId]) { 1326 shadow.push(this.shadowWidgets[widgetsId][key]()); 1327 } 1328 return array_unique(shadow); 1329 }, 1330 1331 widgetsTriggersBind: {}, 1332 1333 registerTriggersBind: function (widgetsId, triggersGetter) { 1334 if (!this.widgetsTriggersBind[widgetsId]) { 1335 this.widgetsTriggersBind[widgetsId] = []; 1336 } 1337 this.widgetsTriggersBind[widgetsId].push(triggersGetter); 1338 }, 1339 1340 callTriggersBind: function (widgetsId) { 1341 for (var key in this.widgetsTriggersBind[widgetsId]) { 1342 this.widgetsTriggersBind[widgetsId][key](); 1343 } 1344 }, 1345 1346 shadeWidgetsCollection: function (base) { 1347 if (this.doShadeWidgetsCollection) { 1348 jQuery(base).append('<div class="single-progress-mark"><div></div></div>'); 1349 } 1350 this.doShadeWidgetsCollection = true; 1351 }, 1352 1353 unshadeWidgetsCollection: function (base) { 1354 jQuery(base + ' .single-progress-mark').remove(); 1355 }, 1356 1357 processUpdateWidgetsCollection: function (widgetsId, widgetsCollection, widgetsCollectionParamsCommon, base) { 1358 // Shadows triggers (unbind and disable the trigger elements) 1359 var triggers = this.getWidgetsTriggers(widgetsId); 1360 for (var k in triggers) { 1361 jQuery(triggers[k]).unbind(k).prop('disabled', 'disabled'); 1362 } 1363 this.shadeWidgetsCollection('.product-details-info'); 1364 1365 // Shadow widgets collection
1366 //this.shadowCollection(base, this.getShadowWidgets(widgetsId)); 1367 1368 // Load widgets 1369 this.loadWidgetsCollection( 1370 base, 1371 widgetsCollection, 1372 array_merge( 1373 widgetsCollectionParamsCommon, 1374 this.getWidgetsParams(widgetsId, widgetsCollectionParamsCommon) 1375 ), 1376 function () { 1377 // Unshadow triggers (bind and enable trigger elements) 1378 for (var k in triggers) { 1379 jQuery(triggers[k]).removeAttr('disabled'); 1380 } 1381 xcart.unshadeWidgetsCollection('.product-details-info'); 1382 xcart.callTriggersBind(widgetsId); 1383 } 1384 ); 1385 }, 1386 1387 // Performs browser redirect on setTimeout 1388 redirectTo: function (url) { 1389 _.defer(function () { 1390 window.location.href = url; 1391 }); 1392 }, 1393 1394 // Trigger common message 1395 trigger: function (name, params) { 1396 var result = true; 1397 1398 name = name.toLowerCase(); 1399 1400 if (this.isReady) { 1401 1402 if (this.isDebug && 'undefined' != typeof (window.console)) { 1403 if (params) { 1404 console.log('Fire \'' + name + '\' event with arguments: ' + var_export(params, true)); 1405 } else { 1406 } 1407 console.log('Fire \'' + name + '\' event'); 1408 } 1409 1410 result = this.messages.trigger(name, [params]); 1411 1412 } else { 1413 this.savedEvents.push( 1414 { 1415 name: name, 1416 params: params 1417 } 1418 ); 1419 } 1420 1421 return result; 1422 }, 1423 1424 // Bind on common messages 1425 bind: function (name, callback) { 1426 if (_.isArray(name)) { 1427 for (var key in name) { 1428 if (name.hasOwnProperty(key)) { 1429 this.messages.bind(name[key].toLowerCase(), callback); 1430 } 1431 } 1432 } else { 1433 this.messages.bind(name.toLowerCase(), callback); 1434 } 1435 1436 return this; 1437 }, 1438 1439 // Unbind on common messages 1440 unbind: function (name, callback) { 1441 if (_.isArray(name)) { 1442 for (var key in name) { 1443 this.messages.unbind(name[key].toLowerCase(), callback); 1444 } 1445 } else { 1446 this.messages.unbind(name.toLowerCase(), callback); 1447 } 1448 1449 return this; 1450 }, 1451 1452 // Get HTML data from server 1453 get: function (url, callback, data, options) { 1454 if (_.isObject(url)) { 1455 url = URLHandler.buildURL(url); 1456 } 1457 1458 options = options || {}; 1459 1460 var completeCallback = options.complete || function () { 1461 }; 1462 var successCallback = options.success || function () { 1463 }; 1464 1465 var headers = { 1466 'ajaxRefererTarget': xcart.getTarget() 1467 }; 1468 options = jQuery.extend( 1469 { 1470 async: true, 1471 cache: false, 1472 contentType: 'text/html', 1473 global: false, 1474 timeout: xliteConfig.ajax_timeout, 1475 type: 'GET', 1476 url: url, 1477 data: data, 1478 headers: headers 1479 }, 1480 options, 1481 { 1482 complete: function () { 1483 _.partial(xcart.onXhrComplete, callback, options, data).apply(this, arguments); 1484 completeCallback.apply(this, arguments); 1485 }, 1486 success: function () { 1487 xcart.onXhrSuccess.apply(this, arguments); 1488 successCallback.apply(this, arguments); 1489 } 1490 } 1491 ); 1492 1493 return jQuery.ajax(options); 1494 }, 1495 1496 // Post form data to server 1497 post: function (url, callback, data, options) { 1498 if (_.isObject(url)) { 1499 url = URLHandler.buildURL(url); 1500 } 1501 1502 options = options || {}; 1503 1504 var completeCallback = options.complete || function () { 1505 }; 1506 var successCallback = options.success || function () { 1507 }; 1508 1509 var headers = { 1510 'ajaxRefererTarget': xcart.getTarget() 1511 }; 1512 1513 options = jQuery.extend( 1514 { 1515 async: true, 1516 cache: false, 1517 contentType: 'application/x-www-form-urlencoded', 1518 global: false, 1519 timeout: xliteConfig.ajax_timeout, 1520 type: 'POST', 1521 url: url, 1522 data: data, 1523 headers: headers 1524 }, 1525 options, 1526 { 1527 complete: function () { 1528 _.partial(xcart.onXhrComplete, callback, options, data).apply(this, arguments); 1529 completeCallback.apply(this, arguments); 1530 }, 1531 success: function () { 1532 xcart.onXhrSuccess.apply(this, arguments); 1533 successCallback.apply(this, arguments); 1534 } 1535 } 1536 ); 1537 1538 return jQuery.ajax(options); 1539 }, 1540 1541 onXhrSuccess: function (data, textStatus, XMLHttpRequest) { 1542 var list = XMLHttpRequest.getAllResponseHeaders().split(/\n/); 1543 1544 var header = _.find(list, function (headerValue) { 1545 return -1 !== headerValue.search(/update-csrf: (.*)/i); 1546 }); 1547 1548 var matches = header 1549 ? header.match(/update-csrf: (.*)/i) 1550 : null; 1551 1552 if (matches && matches[1]) { 1553 var headerData = JSON.parse(matches[1]); 1554 1555 if (headerData.name === 'xcart_form_id' && headerData.old === xliteConfig.form_id) {
1556 xliteConfig.form_id = headerData.value; 1557 } 1558 } 1559 }, 1560 1561 onXhrComplete: function (callback, options, data, XMLHttpRequest, textStatus) { 1562 var callCallback = xcart.preprocessResponse(XMLHttpRequest, options, callback); 1563 data = xcart.processResponse(XMLHttpRequest); 1564 var notValid = !!XMLHttpRequest.getResponseHeader('not-valid'); 1565 1566 return (callCallback && callback) ? callback(XMLHttpRequest, textStatus, data, !notValid) : true; 1567 }, 1568 1569 // Response preprocess (run callback or not) 1570 preprocessResponse: function (xhr, options, callback) { 1571 var result = true; 1572 1573 var responseStatus = parseInt(xhr.getResponseHeader('ajax-response-status')); 1574 1575 if (200 == xhr.status && 279 == responseStatus && xhr.getResponseHeader('AJAX-Location') && (!options || !options.rpc)) { 1576 xcart.get( 1577 xhr.getResponseHeader('AJAX-Location'), 1578 callback 1579 ); 1580 1581 result = false; 1582 1583 } else if (278 == responseStatus) { 1584 if (options.preventRedirect) { 1585 return result 1586 } 1587 1588 // Redirect 1589 var url = xhr.getResponseHeader('AJAX-Location'); 1590 1591 if (url) { 1592 window.location.assign(url); 1593 } 1594 1595 if (!url || this.urlHasHash(url)) { 1596 window.location.reload(true); 1597 } 1598 1599 result = false;
1600 } 1601 1602 return result; 1603 }, 1604 1605 urlHasHash: function (url) { 1606 return url.indexOf('#') !== -1; 1607 }, 1608 1609 // Process response from server 1610 processResponse: function (xhr) { 1611 var response = xhr.responseText; 1612 this.getXhrMiddlewares().forEach(function (callback) { 1613 var result = callback(xhr, response); 1614 if (typeof (result) !== 'undefined') { 1615 response = result; 1616 } 1617 }); 1618 1619 return (4 == xhr.readyState && 200 == xhr.status) ? response : false; 1620 }, 1621 1622 processBackendEvents: function (xhr) { 1623 if (4 == xhr.readyState) { 1624 var list = xhr.getAllResponseHeaders().split(/\n/); 1625 1626 for (var i = 0; i < list.length; i++) { 1627 if (-1 !== list[i].search(/^event-([^:]+):(.+)/i)) { 1628 1629 // Server-side event 1630 var m = list[i].match(/event-([^:]+):(.+)/i); 1631 xcart.trigger(m[1].toLowerCase(), eval('(' + m[2] + ')')); 1632 } 1633 } 1634 } 1635 }, 1636 1637 showInternalError: function () { 1638 return this.showError(this.t('Javascript core internal error. Page will be refreshed automatically')); 1639 }, 1640 1641 showServerError: function () { 1642 return this.showError(this.t('Background request to server side is failed. Page will be refreshed automatically')); 1643 }, 1644 1645 showError: function (message) { 1646 xcart.trigger( 1647 'message', 1648 {'type': 'error', 'message': message} 1649 ); 1650 }, 1651 1652 translator: null, 1653 1654 t: function (label, substitute) { 1655 return this.getTranslator().translate(label, substitute); 1656 }, 1657 1658 loadLanguageHash: function (hash) { 1659 return this.getTranslator().loadLanguageHash(hash); 1660 }, 1661 1662 getTranslator: function () { 1663 if (this.translator === null) { 1664 this.translator = new Translator(); 1665 } 1666 1667 return this.translator; 1668 }, 1669 1670 getHtmlResourcesLoadPromise: function () { 1671 return this.htmlResourcesLoadDeferred.promise(); 1672 }, 1673 1674 loadResource: function (resource, type) { 1675 var deferred = new $.Deferred(); 1676 if (_.isString(resource)) { 1677 resource = { 1678 url: resource, 1679 widget: '' 1680 }; 1681 } 1682 1683 type = type || xcart.getExtension(resource.url); 1684 1685 if (!resource.url.startsWith('var/theme/custom.css') && xcart.isLoadedResource(resource.url)) { 1686 return; 1687 } 1688 1689 var url = resource.url; 1690 1691 if ('' !== xcart.resourcesCacheTimestamp) { 1692 url = url 1693 + (url.indexOf('?') === -1 ? '?' : '&') 1694 + xcart.resourcesCacheTimestamp; 1695 } 1696 1697 LazyLoad[type](url, function () { 1698 xcart.registerResources([url]); 1699 xcart.trigger('resources.loaded', {file: url, widget: resource.widget}); 1700 deferred.resolve(); 1701 }); 1702 1703 return deferred.promise(); 1704 }, 1705 1706 isLoadedResource: function (url) { 1707 return _.contains(xcart.resources, url); 1708 }, 1709 1710 registerResources: function (list) { 1711 for (var key in list) { 1712 xcart.resources.push(list[key]); 1713 } 1714 }, 1715 1716 parseResources: function (element, uuid) { 1717 var restoreCallback = xcart.microhandlers.supressRun(); 1718 uuid = uuid || ''; 1719 element = jQuery(element); 1720 var resource = element.find('script[data-resource]').first(); 1721 1722 if (resource.length) { 1723 var data = JSON.parse(resource.html()); 1724 resource.remove(); 1725 1726 if (data.css || data.js) { 1727 var cssLoaded = xcart.loadResources(data.css, 'css'); 1728 var jsLoaded = xcart.loadResources(data.js, 'js'); 1729 1730 jQuery.when(cssLoaded, jsLoaded).done( 1731 function () { 1732 restoreCallback(); 1733 xcart.trigger('resources.ready', {widget: data.widget, uuid: uuid}); 1734 } 1735 ); 1736 } else { 1737 restoreCallback(); 1738 xcart.trigger('resources.empty', {widget: data.widget, uuid: uuid}); 1739 } 1740 } 1741 }, 1742 1743 loadResources: function (list, type) { 1744 var deferred = new $.Deferred(); 1745 var promises = []; 1746 1747 $.when(this.getHtmlResourcesLoadPromise()).then(function () { 1748 for (var key in list) { 1749 var resource = list[key]; 1750 1751 promises.push(xcart.loadResource(resource, type)); 1752 } 1753 1754 $.when.apply($, promises).then( 1755 function () { 1756 deferred.resolve(); 1757 } 1758 ); 1759 }); 1760 1761 return deferred.promise(); 1762 }, 1763 1764 parsePreloadedLabels: function (element, uuid) { 1765 element = jQuery(element); 1766 uuid = uuid || ''; 1767 var labelsContainer = element.find('script[data-preloaded-labels]').first(); 1768 1769 if (labelsContainer.length) { 1770 var data = JSON.parse(labelsContainer.html()); 1771 labelsContainer.remove(); 1772 1773 if (data.labels) { 1774 xcart.loadLabels(data.labels); 1775 xcart.trigger('preloaded_labels.ready', {widget: data.widget, uuid: uuid}); 1776 } else { 1777 xcart.trigger('preloaded_labels.empty', {widget: data.widget, uuid: uuid}); 1778 } 1779 } 1780 }, 1781 1782 loadLabels: function (list) { 1783 this.loadLanguageHash(list); 1784 }, 1785 1786 parseObjectString: function (objectString) { 1787 if (typeof (JSON5) !== 'undefined') { 1788 return JSON5.parse(objectString); 1789 } 1790 1791 console.error('Cannot parse JS object from string: JSON5 is not loaded'); 1792 }, 1793 1794 getLayoutOptions: function () {
1795 return window.xliteLayoutOptions || {}; 1796 }, 1797 1798 rest: { 1799 1800 lastResponse: null, 1801 1802 request: function (type, name, id, data, callback) { 1803 if (!type || !name) { 1804 return false; 1805 } 1806 1807 this.lastResponse = null; 1808 1809 var xhr = jQuery.ajax( 1810 { 1811 async: false !== callback, 1812 cache: false, 1813 complete: function (xhr, status) { 1814 return this.callback(xhr, status, callback); 1815 }, 1816 context: this, 1817 data: data, 1818 timeout: 30000, 1819 type: ('get' == type ? 'GET' : 'POST'), 1820 url: URLHandler.buildURL( 1821 { 1822 target: 'rest', 1823 action: type, 1824 name: name, 1825 id: id 1826 } 1827 ) 1828 } 1829 ); 1830 1831 if (false === callback) { 1832 xhr = (this.lastResponse && this.lastResponse.status == 'success') ? this.lastResponse.data : null; 1833 } 1834 1835 return xhr; 1836 }, 1837 1838 get: function (name, id, callback) { 1839 return this.request('get', name, id, null, callback); 1840 }, 1841 1842 post: function (name, id, data, callback) { 1843 return this.request('post', name, id, data, callback); 1844 }, 1845 1846 put: function (name, data, callback) { 1847 return this.request('put', name, null, data, callback); 1848 }, 1849 1850 'delete': function (name, id, callback) { 1851 return this.request('delete', name, id, null, callback); 1852 }, 1853 1854 callback: function (xhr, status, callback) { 1855 try { 1856 var data = jQuery.parseJSON(xhr.responseText); 1857 1858 } catch (e) { 1859 var data = null; 1860 } 1861 1862 if (false === callback) { 1863 xcart.rest.lastResponse = data; 1864 1865 } else if (callback) { 1866 callback(xhr, status, data); 1867 } 1868 } 1869 }, 1870 1871 clearHash: function (paramName) { 1872 var scrollV, scrollH, loc = window.location; 1873 var newHash = ''; 1874 1875 if (paramName !== undefined) { 1876 var pattern = '&?(' + paramName + '(\\[\\S*\\])*=[^&]*&?)'; 1877 var re = new RegExp(pattern, 'gi'); 1878 1879 newHash = loc.hash.replace(re, '').slice(1); 1880 } 1881 ; 1882 1883 // Prevent scrolling by storing the page's current scroll offset 1884 scrollV = document.body.scrollTop; 1885 scrollH = document.body.scrollLeft; 1886 1887 if (newHash !== loc.hash) { 1888 loc.hash = newHash; 1889 } 1890 1891 // Restore the scroll offset, should be flicker free 1892 document.body.scrollTop = scrollV; 1893 document.body.scrollLeft = scrollH; 1894 }, 1895 1896 autoload: function (className, element, extendedClass = null) { 1897 if ('function' === typeof (className)) { 1898 let m = className.toString().match(/function ([^\(]+)/); 1899 1900 m = !m && extendedClass ? extendedClass : m[1]; 1901 window[m] = className; 1902 className = m; 1903 } 1904 1905 var classObject = window[className]; 1906 1907 jQuery(document).ready( 1908 function () { 1909 if ('undefined' != typeof (classObject)) { 1910 if ('undefined' != typeof (element)) { 1911 jQuery(element).each(function (index, el) { 1912 jQuery(el).data('controller', new (classObject)(jQuery(el))); 1913 }); 1914 } else if ('function' == typeof (classObject.autoload)) { 1915 classObject.autoload(); 1916 1917 } else { 1918 new (classObject)(); 1919 } 1920 } 1921 } 1922 ); 1923 }, 1924 1925 // Return value of variable that is given in class attribute: e.g. class="superclass productid-100001 test" 1926 getValueFromClass: function (obj, prefix) { 1927 var m = jQuery(obj) 1928 .attr('class') 1929 .match(new RegExp(prefix + '-([^ ]+)( |$)')); 1930 1931 return m ? m[1] : null; 1932 }, 1933 1934 // Return value of variable that is given in comment block: e.g. <!-- 'productid': '100001', 'var': 'value', -->" 1935 getCommentedData: function (obj, name) { 1936 if (jQuery(obj).get(0)) { 1937 var children = jQuery(obj).get(0).childNodes; 1938 } else { 1939 return name ? null : []; 1940 } 1941 var m = false; 1942 1943 for (var i = 0; i < children.length && !m; i++) { 1944 if ('SCRIPT' == children[i].nodeName && 'text/x-cart-data' == children[i].type) { 1945 m = children[i].innerHTML; 1946 m = m.replace(/^\n\r/, '').replace(/\r\n$/, ''); 1947 try { 1948 m = eval('(' + m + ')'); 1949 } catch (e) { 1950 m = false;
1951 } 1952 } 1953 } 1954 1955 if (m && name) { 1956 m = 'undefined' == typeof (m[name]) ? null : m[name]; 1957 } 1958 1959 return m ? m : null; 1960 }, 1961 1962 // Toggle link text and toggle obj visibility 1963 toggleText: function (link, text, obj) { 1964 if (undefined === link.prevValue) { 1965 link.prevValue = jQuery(link).html(); 1966 } 1967 jQuery(link).html(jQuery(link).html() === text ? link.prevValue : text); 1968 jQuery(obj).toggle(); 1969 }, 1970 1971 setRelArray: function ($obj, relArray) { 1972 $obj.attr('data-rel', _.map(_.pairs(relArray), function (value) { 1973 return value.join(': '); 1974 }).join(', ')); 1975 }, 1976 1977 getRelArray: function ($obj) { 1978 var rel = $obj.attr('data-rel'); 1979 1980 return _.object(_.map(rel.split(','), function (value, key, list) { 1981 return _.map(_.trim(value).split(':'), function (value) { 1982 return _.trim(value); 1983 }); 1984 })); 1985 }, 1986 1987 // Decorate class after page loading 1988 decorate: function (className, methodName, func) { 1989 xcart.bind( 1990 'load', 1991 function () { 1992 decorate(className, methodName, func); 1993 } 1994 ); 1995 }, 1996 1997 // Decorate some class after page loading 1998 decorates: function (list, func) { 1999 xcart.bind( 2000 'load', 2001 function () { 2002 for (var i = 0; i < list.length; i++) { 2003 decorate(list[i][0], list[i][1], func); 2004 } 2005 } 2006 ); 2007 }, 2008 2009 stringToNumber: function (number, dDelim, tDelim) { 2010 if ('' !== tDelim) { 2011 number = number.replace(new RegExp('\\' + tDelim, 'g'), ''); 2012 } 2013 2014 var a = number.split(dDelim); 2015 2016 return parseFloat(a[0] + '.' + a[1]); 2017 }, 2018 2019 numberToString: function (number, dDelim, tDelim, precision) { 2020 dDelim = dDelim || '.'; 2021 tDelim = tDelim || ''; 2022 precision = precision || 0; 2023 2024 precision = Math.max(parseInt(precision), 0); 2025 2026 number = this.round(number, precision).toString(); 2027 /* 2028 Author: Robert Hashemian 2029 http://www.hashemian.com/ 2030 2031 You can use this code in any manner so long as the author's name, 2032 Web address and this disclaimer is kept intact. 2033 ********************************************************/ 2034 2035 var a = number.split('.'); 2036 var x = a[0]; // decimal 2037 var y = a[1]; // fraction 2038 var z = ''; 2039 2040 if (typeof (x) != 'undefined') { 2041 // reverse the digits. regexp works from left to right. 2042 for (var i = x.length - 1; i >= 0; i--) { 2043 z += x.charAt(i); 2044 } 2045 2046 // add separators. but undo the trailing one, if there 2047 z = z.replace(/(\d{3})/g, '$1' + tDelim); 2048 2049 if (z.slice(-tDelim.length) == tDelim) { 2050 z = z.slice(0, -tDelim.length); 2051 } 2052 2053 x = ''; 2054 2055 // reverse again to get back the number 2056 for (i = z.length - 1; i >= 0; i--) { 2057 x += z.charAt(i); 2058 } 2059 2060 // add the fraction back in, if it was there 2061 if (typeof (y) != 'undefined' && y.length > 0) { 2062 x += dDelim + y + this.repeat('0', precision - y.length); 2063 2064 } else if (precision > 0) { 2065 x += dDelim + this.repeat('0', precision); 2066 } 2067 } 2068 2069 return x; 2070 }, 2071 2072 getExtension: function (path) { 2073 return path.slice((path.lastIndexOf('.') - 1 >>> 0) + 2); 2074 }, 2075 2076 repeat: function (s, n) { 2077 var a = []; 2078 while (a.length < n) { 2079 a.push(s); 2080 } 2081 2082 return a.join(''); 2083 }, 2084 2085 round: function (number, precision) { 2086 precision = precision || 0; 2087 precision = Math.max(parseInt(precision), 0); 2088 2089 var pow = Math.pow(10, precision); 2090 2091 return Math.round(number * pow) / pow; 2092 }, 2093 2094 loadWidgetsCollection: function (base, collectionName, params, restoreCallback) { 2095 this.get( 2096 URLHandler.buildURL(array_merge({ 2097 'target': 'widgets_collection', 2098 'action': 'get', 2099 'widget': collectionName 2100 }, params)), 2101 function (XMLHttpRequest, textStatus, data) { 2102 try { 2103 data = JSON.parse(data); 2104 for (var key in data) { 2105 jQuery('.' + data[key].view, jQuery(base)).replaceWith(data[key].content); 2106// xcart.unshadowWidget(base, '.' + data[key].view); 2107 } 2108 restoreCallback(); 2109 2110 } catch (error) { 2111 console.log(error.message); 2112 } 2113 } 2114 ); 2115 }, 2116 2117 shadowCollection: function (base, collection) { 2118 for (key in collection) { 2119 jQuery(collection[key], jQuery(base)).after('<div class="single-progress-mark"></div>'); 2120 } 2121 }, 2122 2123 unshadowWidget: function (base, widget) { 2124 jQuery('.single-progress-mark', jQuery(widget, jQuery(base)).parent()).remove(); 2125 }, 2126 2127 getURLParam: function (name) { 2128 name = name.replace(/[\[]/, '\\\[').replace(/[\]]/, '\\\]'); 2129 var regexS = '[\\?&]' + name + '=([^&#]*)'; 2130 var regex = new RegExp(regexS); 2131 var results = regex.exec(window.location.href); 2132 if (results == null) { 2133 return ''; 2134 } else { 2135 return results[1]; 2136 } 2137 }, 2138 2139 getUrlParams: function (url) { 2140 if (_.isUndefined(url)) { 2141 url = window.location.search; 2142 } 2143 2144 if (url.indexOf('?') >= 0) { 2145 url = url.substr(url.indexOf('?') + 1); 2146 } 2147 2148 var searchParams = new URLSearchParams(url); 2149 2150 var result = []; 2151 for (const [key, value] of searchParams) { 2152 result[key] = searchParams.get(key); 2153 } 2154 return result; 2155 }, 2156 2157 getTarget: function () { 2158 return xliteConfig.target; 2159 }, 2160 2161 getFormIdString: function () { 2162 return xliteConfig.form_id_name + '=' + xliteConfig.form_id; 2163 }, 2164 2165 /** 2166 * @param {Element} el 2167 * @param {string} selector 2168 * @return {Array<Element>} 2169 */ 2170 parents: (el, selector) => { 2171 const parents = []; 2172 2173 while ((el = el.parentNode) && el !== document) { 2174 if (el.matches(selector) || !selector) { 2175 parents.push(el); 2176 } 2177 } 2178 2179 return parents; 2180 } 2181}; 2182 2183// HTTP requester detection 2184try { 2185 const xhr = window.ActiveXObject ? new ActiveXObject('Microsoft.XMLHTTP') : new XMLHttpRequest() 2186 xcart.isRequesterEnabled = !!xhr 2187} catch (e) { 2188} 2189 2190// Common onready event handler 2191jQuery(document).ready( 2192 function () { 2193 xcart.isReady = true; 2194 xcart.trigger('load'); 2195 for (var i = 0; i < xcart.savedEvents.length; i++) { 2196 xcart.trigger(xcart.savedEvents[i].name, xcart.savedEvents[i].params); 2197 } 2198 xcart.savedEvents = []; 2199 } 2200); 2201 2202xcart.isDeveloperMode = xliteConfig.developer_mode; 2203 2204/** 2205 * Common functions 2206 */ 2207 2208// Check - specified object is HTML element or not 2209function isElement(obj, type) { 2210 return obj && typeof (obj.tagName) != 'undefined' && obj.tagName.toLowerCase() == type; 2211} 2212 2213jQuery.extend({ 2214 getQueryParameters: function (str) { 2215 return (str || document.location.search).replace(/(^\?)/, '').split('&').map(function (n) { 2216 return n = n.split('='), this[n[0]] = n[1], this; 2217 }.bind({}))[0]; 2218 } 2219}); 2220 2221xcart.bind( 2222 'load', 2223 function () { 2224 jQuery('input[type=checkbox]').each( 2225 function () { 2226 var checkbox = this; 2227 2228 jQuery(checkbox).bind( 2229 'click', 2230 function () { 2231 return !jQuery(checkbox).prop('readonly'); 2232 } 2233 ); 2234 } 2235 ); 2236 2237 jQuery('.model-form-buttons .button:first-child button').addClass('btn-warning'); 2238 } 2239); 2240 2241/* Microhandlers */ 2242 2243xcart.microhandlers = {}; 2244 2245xcart.microhandlers.list = {}; 2246 2247xcart.microhandlers.initialRunned = false;
2248xcart.microhandlers.supressRunOnAdd = false; 2249 2250xcart.microhandlers.supressRun = function () { 2251 var previous = this.supressRunOnAdd; 2252 this.supressRunOnAdd = true; 2253 2254 return _.bind( 2255 function () { 2256 this.supressRunOnAdd = false; 2257 }, 2258 this 2259 ); 2260}; 2261 2262xcart.microhandlers.add = function (name, pattern, handler) { 2263 this.list[name] = { 2264 'pattern': pattern, 2265 'handler': handler 2266 }; 2267 2268 if (this.initialRunned && !this.supressRunOnAdd) { 2269 this.run(name); 2270 } 2271}; 2272 2273xcart.microhandlers.run = function (name, base) { 2274 base = base || document; 2275 2276 if ('undefined' != typeof (this.list[name]) && this.list[name]) { 2277 if (_.isString(this.list[name].pattern)) { 2278 jQuery(this.list[name].pattern, base) 2279 .filter(_.bind(this.filterByMark(name), this)) 2280 .each(this.list[name].handler) 2281 .each(_.bind(this.assignMark(name), this)); 2282 2283 } else if (_.isFunction(this.list[name].pattern)) { 2284 this.list[name].pattern() 2285 .filter(_.bind(this.filterByMark(name), this)) 2286 .each(this.list[name].handler) 2287 .each(_.bind(this.assignMark(name), this)); 2288 } 2289 } 2290}; 2291 2292xcart.microhandlers.runInitial = function () { 2293 this.initialRunned = true; 2294 this.runAll(document); 2295}; 2296 2297xcart.microhandlers.runAll = function (base) { 2298 _.each( 2299 _.keys(this.list), 2300 function (name) { 2301 if (typeof this.run !== 'undefined') { 2302 this.run(name, base); 2303 } 2304 }, 2305 this 2306 ); 2307}; 2308 2309xcart.microhandlers.filterByMark = function (name) { 2310 return function (idx, elm) { 2311 return !jQuery(elm).data('microhandler-' + name); 2312 }; 2313}; 2314 2315xcart.microhandlers.assignMark = function (name) { 2316 return function (idx, elm) { 2317 jQuery(elm).data('microhandler-' + name, true); 2318 }; 2319}; 2320 2321xcart.microhandlers.add( 2322 'BootstrapTooltip', 2323 '[data-toggle="tooltip"]', 2324 function (event) { 2325 jQuery(this).tooltip(); 2326 } 2327); 2328 2329xcart.microhandlers.add( 2330 'BootstrapPopover', 2331 '[data-toggle="popover"]', 2332 function (event) { 2333 if (!_.isUndefined(jQuery(this).startTooltip)) { 2334 jQuery(this).startTooltip(); 2335 } 2336 } 2337); 2338 2339xcart.bind( 2340 'load', 2341 function () { 2342 xcart.microhandlers.runInitial(); 2343 } 2344); 2345 2346xcart.bind( 2347 'loader.loaded', 2348 function (event, widget) { 2349 xcart.microhandlers.runAll(widget.base); 2350 } 2351); 2352 2353xcart.bind( 2354 'vue-form.ready', 2355 function (event, element) { 2356 xcart.microhandlers.runAll(element); 2357 } 2358); 2359 2360if (window.CoreAMD !== undefined) { 2361 define('js/xcart', function () { 2362 return xcart; 2363 }); 2364} else { 2365 document.addEventListener('amd-ready', function (event) { 2366 define('js/xcart', function () { 2367 return xcart; 2368 }); 2369 }); 2370}; 2371/* AUTOGENERATED: xcart.extend.js */ 2372/* vim: set ts=2 sw=2 sts=2 et: */ 2373 2374/** 2375 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 2376 * See https://www.x-cart.com/license-agreement.html for license details. 2377 */ 2378 2379Object.getOwnPropertyDescriptors = function getOwnPropertyDescriptors(obj) { 2380 var descriptors = {}; 2381 for (var prop in obj) { 2382 if (obj.hasOwnProperty(prop)) { 2383 descriptors[prop] = Object.getOwnPropertyDescriptor(obj, prop); 2384 } 2385 } 2386 return descriptors; 2387}; 2388 2389Function.prototype.extend = function (proto) { 2390 var superclass = this; 2391 var constructor; 2392 2393 if (!proto.hasOwnProperty('constructor')) { 2394 Object.defineProperty(proto, 'constructor', { 2395 value: function () { 2396 // Default call to superclass as in maxmin classes 2397 superclass.apply(this, arguments); 2398 }, 2399 writable: true, 2400 configurable: true, 2401 enumerable: false 2402 }); 2403 } 2404 constructor = proto.constructor; 2405 2406 constructor.prototype = Object.create(this.prototype, Object.getOwnPropertyDescriptors(proto)); 2407 2408 constructor.superclass = superclass.prototype; 2409 2410 return constructor; 2411};; 2412/* AUTOGENERATED: xcart.controller.js */ 2413/* vim: set ts=2 sw=2 sts=2 et: */ 2414 2415/** 2416 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 2417 * See https://www.x-cart.com/license-agreement.html for license details. 2418 */ 2419 2420// Abstract controller 2421function AController(base) 2422{ 2423 if (!base) { 2424 2425 // Search base DOM element(s) 2426 base = this.findBase(); 2427 } 2428 2429 if (base) { 2430 2431 if (base.length > 1) { 2432 2433 // Multiple binding 2434 for (var i = 0; i < base.length; i++) { 2435 eval('new ' + this.name + '(jQuery(base[i]))'); 2436 } 2437 2438 } else { 2439 2440 // Simple binding 2441 this.bind(jQuery(base)); 2442 } 2443 } 2444} 2445 2446// Parent class - Base 2447extend(AController, Base); 2448 2449// [ABSTRACT] Controller unique name 2450AController.prototype.name = null; 2451 2452// Base DOM element 2453AController.prototype.base = null; 2454 2455// Find jQuery pattern 2456AController.prototype.findPattern = null; 2457 2458// Check - controller is catch base DOM element or not 2459AController.prototype.isBinded = function() 2460{ 2461 return !!this.base; 2462} 2463 2464// Bind controller to base DOM element 2465AController.prototype.bind = function(base) 2466{ 2467 var result = false;
2468 2469 if (this.name && !this.isBaseCatched(base) && this.detectBase(base)) { 2470 var o = this; 2471 base = jQuery(base); 2472 base.map( 2473 function() { 2474 this.controller = o; 2475 } 2476 ); 2477 this.base = base; 2478 2479 this.initialize(); 2480 2481 result = true; 2482 } 2483 2484 return result; 2485} 2486 2487// Check - controller is binded to base DOM element or not 2488AController.prototype.isBaseCatched = function(base) 2489{ 2490 var result = false; 2491 2492 if ('undefined' != typeof(base.map)) { 2493 base.map( 2494 function() { 2495 if (!result && typeof(this.controller) != 'undefined') { 2496 result = true; 2497 } 2498 } 2499 ); 2500 2501 } else if (typeof(base.controller) != 'undefined') { 2502 result = true; 2503 } 2504 2505 return result; 2506} 2507 2508// [ABSTRACT] Detect base 2509AController.prototype.detectBase = function() 2510{ 2511 return !!this.findPattern; 2512} 2513 2514// [ABSTRACT] Initialize controller 2515AController.prototype.initialize = function() 2516{ 2517} 2518 2519// Find base if controller create without base DOM element specification 2520AController.prototype.findBase = function() 2521{ 2522 return this.findPattern ? jQuery(this.findPattern) : false; 2523}; 2524/* AUTOGENERATED: xcart.loadable.js */ 2525/* vim: set ts=2 sw=2 sts=2 et: */ 2526 2527/** 2528 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 2529 * See https://www.x-cart.com/license-agreement.html for license details. 2530 */ 2531 2532// Constructor 2533function ALoadable(base) 2534{ 2535 ALoadable.superclass.constructor.apply(this, arguments); 2536 2537 if (base && this.checkBase(jQuery(base))) { 2538 this.basePattern = base; 2539 this.base = jQuery(base); 2540 this.loadHandlerCallback = _.bind(this.loadHandler, this); 2541 this.postprocess(true, true); 2542 2543 if (this.listenToHash && (!jQuery.isEmptyObject(hash.get()))) { 2544 jQuery(document).ready(_.bind(this.loadByHash, this)); 2545 } 2546 2547 if (this.replaceState) { 2548 window.addEventListener( "popstate", function ( event ) { 2549 window.location.reload(true); 2550 }); 2551 } 2552 } 2553} 2554 2555extend(ALoadable, Base); 2556 2557// Base element(s) 2558ALoadable.prototype.base = null; 2559 2560// Base pattern 2561ALoadable.prototype.basePattern = null; 2562 2563// Shade flag 2564ALoadable.prototype.isShowModalScreen = false; 2565 2566// Widget loading flag 2567ALoadable.prototype.isLoading = false; 2568 2569// Widget has deferred load operation 2570ALoadable.prototype.deferredLoad = false; 2571 2572// Preload event custom handler 2573ALoadable.prototype.preloadHandler = null; 2574 2575// Postload event custom handler 2576ALoadable.prototype.postloadHandler = null; 2577 2578ALoadable.prototype.listenToHash = false; 2579 2580ALoadable.prototype.listenToHashPrefix = ''; 2581 2582ALoadable.prototype.replaceState = false; 2583 2584ALoadable.prototype.replaceStatePrefix = ''; 2585 2586 2587// Options 2588 2589// Use shade 2590ALoadable.prototype.shadeWidget = true; 2591 2592// Class for shade overlay 2593ALoadable.prototype.shadeClass = null; 2594 2595// Use widget blocking 2596ALoadable.prototype.blockWidget = true; 2597 2598// Update page title from loaded request or not 2599ALoadable.prototype.updatePageTitle = false; 2600 2601// Update breadcrumb last node from loaded request or not 2602ALoadable.prototype.updateBreadcrumb = false;
2603 2604// Widget target 2605ALoadable.prototype.widgetTarget = null; 2606 2607// Widget parameters 2608ALoadable.prototype.widgetParams = null; 2609 2610// Widget class name 2611ALoadable.prototype.widgetClass = null; 2612 2613// Page title element pattern 2614ALoadable.prototype.titlePattern = 'h1'; 2615 2616// Page title element pattern in request's response data 2617ALoadable.prototype.titleRequestPattern = '.ajax-container-loadable'; 2618 2619// Container element pattern in request's response data 2620ALoadable.prototype.containerRequestPattern = 'div.ajax-container-loadable'; 2621 2622ALoadable.prototype.reloadIfError = true; 2623 2624// Check base 2625ALoadable.prototype.checkBase = function(base) 2626{ 2627 var result = 0 < base.length; 2628 2629 if (result) { 2630 base.map( 2631 function() { 2632 if (result && 'undefined' != typeof(this.loadable)) { 2633 result = false; 2634 } 2635 } 2636 ); 2637 } 2638 2639 return result; 2640} 2641 2642// Load widget 2643ALoadable.prototype.doReplaceState = function(params) { 2644 var o = this, origParams = {}; 2645 2646 window.location.search.substring(1).split('&').forEach(function (v) { 2647 var pair = v.split('='); 2648 2649 if ( 2650 !_.isUndefined(pair[0]) 2651 && !_.isUndefined(pair[1]) 2652 && pair[0] !== o.replaceStatePrefix 2653 ) { 2654 // this condition for 'reset filter' 2655 if (jQuery.isEmptyObject(params) && pair[0].indexOf(o.replaceStatePrefix + '[') == 0) { 2656 return; 2657 } 2658 origParams[pair[0]] = pair[1]; 2659 } 2660 }); 2661 2662 var url = window.location.pathname; 2663 var queryString = ''; 2664 params = array_merge(origParams, params || {}); 2665 2666 $.each(params, function (key, value) { 2667 queryString += '&' + key + '=' + value; 2668 }); 2669 2670 if (queryString) { 2671 url += '?'; 2672 } 2673 url += queryString.substring(1); 2674 2675 window.history.pushState(params, 'Filter', url); 2676}; 2677 2678// Load widget 2679ALoadable.prototype.load = function(params) 2680{ 2681 if (this.replaceState) { 2682 this.doReplaceState(params); 2683 } 2684 2685 if (this.listenToHash) { 2686 hash.add(params); 2687 } 2688 2689 if (!xcart.isRequesterEnabled) { 2690 return false; 2691 } 2692 2693 if (this.isLoading) { 2694 this.deferredLoad = true; 2695 return true; 2696 } 2697 2698 this.isLoading = true; 2699 this.deferredLoad = false; 2700 2701 this.lastLoadParams = params; 2702 2703 var url = this.buildWidgetRequestURL(params); 2704 2705 if (this.base) { 2706 this.base.trigger('preload', [this, url]); 2707 2708 if (typeof(this.preloadHandler) == 'function') { 2709 2710 // Call preload event handler 2711 this.preloadHandler.call(this.base); 2712 } 2713 } 2714 2715 var state = { 'widget': this, 'url': url, 'options': this.getLoaderOptions() } 2716 2717 this.triggerVent('preload', state); 2718 2719 this.saveState(); 2720 2721 this.shade(); 2722 2723 state.xhr = xcart.get(state.url, this.loadHandlerCallback, null, state.options); 2724 2725 this.triggerVent('afterload', state); 2726 2727 return state.xhr; 2728}; 2729 2730// Build request widget URL (AJAX) 2731ALoadable.prototype.buildWidgetRequestURL = function(params) 2732{ 2733 return URLHandler.buildURL(this.getParams(params)); 2734}; 2735 2736// [ABSTRACT] Get additional parameters 2737ALoadable.prototype.getParams = function(params) 2738{ 2739 params = params ? params : {}; 2740 2741 // Set widget target and parameters 2742 if ('undefined' == typeof(params.target) && this.widgetTarget) { 2743 params.target = this.widgetTarget; 2744 } 2745 2746 if (this.widgetParams) { 2747 for (var i in this.widgetParams) { 2748 params[i] = this.widgetParams[i]; 2749 } 2750 } 2751 2752 // TODO remove if it will be no use!! 2753 if ('undefined' == typeof(params.sessionCell) && this.sessionCell) { 2754 params.sessionCell = this.sessionCell; 2755 } 2756 2757 if ('undefined' == typeof(params.action)) { 2758 params.action = ''; 2759 } 2760 2761 if ('undefined' == typeof(params.widget) && this.widgetClass) { 2762 params.widget = this.widgetClass; 2763 } 2764 2765 return params; 2766}; 2767 2768// Loader AJAX options 2769ALoadable.prototype.getLoaderOptions = function() 2770{ 2771 return {}; 2772} 2773 2774ALoadable.prototype.createTemporaryContainer = function(data){ 2775 2776 var container = this.getTemporaryContainer(); 2777 2778 container.html(data); 2779 2780 return container; 2781}; 2782 2783// onload handler 2784ALoadable.prototype.loadHandler = function(xhr, s, data) 2785{ 2786 this.isLoading = false; 2787 2788 this.unshade(); 2789 2790 if (false !== data) { 2791 2792 var container = this.createTemporaryContainer(data); 2793 2794 var uuid = _.uniqueId(); 2795 2796 xcart.bind(['resources.ready', 'resources.empty'], _.bind( 2797 function(event, args){ 2798 if (args.uuid === uuid) { 2799 var content = this.extractRequestData(container); 2800 container.remove(); 2801 if (this.isValidContent(content)) { 2802 var processed = false;
2803 processed = this.placeRequestData(content); 2804 this.finishLoadHandler(processed); 2805 } 2806 } 2807 }, 2808 this) 2809 ); 2810 2811 xcart.parsePreloadedLabels(container, uuid); 2812 xcart.parseResources(container, uuid); 2813 } 2814}; 2815 2816 2817// Check loaded content 2818ALoadable.prototype.finishLoadHandler = function(processed) 2819{ 2820 jQuery(this.base).data('controller', this); 2821 2822 this.postprocess(processed); 2823 2824 if (!this.isLoading && this.deferredLoad) { 2825 this.deferredLoad = false; 2826 this.load(this.lastLoadParams); 2827 2828 } else if (processed) { 2829 if (typeof(this.postloadHandler) == 'function') { 2830 this.postloadHandler.call(this.base, xhr); 2831 } 2832 2833 this.triggerVent('loaded', this); 2834 xcart.trigger('loader.loaded', this); 2835 2836 } else { 2837 2838 this.triggerVent('loadingError', {'widget': this, 'arguments': arguments}); 2839 if (this.reloadIfError) { 2840 setTimeout( 2841 _.bind( 2842 function() { 2843 this.load(this.lastLoadParams); 2844 }, 2845 this 2846 ), 2847 300 2848 ); 2849 } 2850 } 2851} 2852 2853// Check loaded content 2854ALoadable.prototype.isValidContent = function(content) 2855{ 2856 return 0 < jQuery(this.containerRequestPattern, content).length; 2857}; 2858 2859// Get temporary container 2860ALoadable.prototype.getTemporaryContainer = function() 2861{ 2862 var div = document.createElement('DIV'); 2863 div.style.display = 'none'; 2864 jQuery('body').get(0).appendChild(div); 2865 return jQuery(div); 2866}; 2867 2868// Extract widget data 2869ALoadable.prototype.extractRequestData = function(div) 2870{ 2871 div.find('script[type!="text/x-cart-data"]').first().remove(); 2872 return div; 2873}; 2874 2875// Place request data 2876ALoadable.prototype.placeRequestData = function(box) 2877{ 2878 // Update page title 2879 if (this.updatePageTitle || this.updateBreadcrumb) { 2880 this.replacePageTitle(box); 2881 } 2882 2883 box = this.extractContent(box); 2884 2885 //TODO: find any reason to add random class. 2886 var id = 'temporary-ajax-id-' + (new Date()).getTime(); 2887 2888 box.addClass(id); 2889 2890 this.base.trigger('reload', [box]); 2891 2892 if (0 < box.length) { 2893 this.base = this.insertIntoDOM(box); 2894 } else { 2895 this.base.empty(); 2896 } 2897 2898 this.base.removeClass(id); 2899 2900 return true; 2901}; 2902 2903// Extract widget content 2904ALoadable.prototype.extractContent = function(box) 2905{ 2906 box = jQuery(this.containerRequestPattern, box); 2907 if (box.children().eq(0).hasClass('block')) { 2908 box = jQuery('.block', box.eq(0)) 2909 .first() 2910 .find('> .content'); 2911 } 2912 2913 return box.children(); 2914}; 2915 2916// Place parsed request data into DOM 2917ALoadable.prototype.insertIntoDOM = function(box) 2918{ 2919 this.base.replaceWith(box); 2920 return box; 2921}; 2922 2923// Replace page title 2924ALoadable.prototype.replacePageTitle = function(box) 2925{ 2926 var title = jQuery(this.titleRequestPattern, box).eq(0).attr('title'); 2927 if (title) { 2928 this.placeNewPageTitle(title); 2929 } 2930 2931 return title; 2932}; 2933 2934// Place new page title 2935ALoadable.prototype.placeNewPageTitle = function(title) 2936{ 2937 if (this.updatePageTitle) { 2938 jQuery(this.titlePattern).eq(0).html(title); 2939 jQuery("head title").eq(0).html(title); 2940 } 2941 2942 if (this.updateBreadcrumb) { 2943 jQuery('#breadcrumb .last').find('a,span').html(title); 2944 } 2945}; 2946 2947// [ABSTRACT] Widget post processing (after new widget data placing) 2948ALoadable.prototype.postprocess = function(isSuccess, initial) 2949{ 2950 if (isSuccess) { 2951 var o = this; 2952 2953 this.base.map( 2954 function() { 2955 this.loadable = o; 2956 } 2957 ); 2958 2959 if (!initial && 'undefined' != typeof(window.CommonForm)) { 2960 this.base.filter('form').each( 2961 function() { 2962 new CommonForm(this); 2963 } 2964 ); 2965 2966 jQuery('form', this.base).each( 2967 function() { 2968 new CommonForm(this); 2969 } 2970 ); 2971 2972 this.base.filter('*:input').each( 2973 function() { 2974 new CommonElement(this); 2975 } 2976 ); 2977 2978 jQuery('*:input', this.base).each( 2979 function() { 2980 new CommonElement(this); 2981 } 2982 ); 2983 2984 } 2985 } 2986 2987 this.triggerVent('postprocess', {'widget': this, 'isSuccess': isSuccess, 'initial': initial}); 2988}; 2989 2990// Load content by hash 2991ALoadable.prototype.loadByHash = function() 2992{ 2993 if (!this.isHashEqual()) { 2994 this.load(hash.get()); 2995 } 2996}; 2997 2998// Check - has is equal arguments of widget 2999ALoadable.prototype.isHashEqual = function() 3000{ 3001 var result = true; 3002 3003 var current = this.base.data('widget-arguments'); 3004 if (current && hash.get()) { 3005 result = _.every( 3006 hash.get(), 3007 function(v, k) { 3008 return 'undefined' != typeof(current[k]) && current[k] == v; 3009 } 3010 ); 3011 3012 } else if (!current && _.size(hash.get()) > 0) { 3013 result = false;
3014 } 3015 3016 return result; 3017}; 3018 3019// [ABSTRACT] Widget save state (before widget load / reload) 3020ALoadable.prototype.saveState = function() 3021{ 3022}; 3023 3024// Show modal screen 3025ALoadable.prototype.shade = function() 3026{ 3027 if (!this.base || !this.base.length) { 3028 return false; 3029 } 3030 3031 if (this.isShowModalScreen) { 3032 return true; 3033 } 3034 3035 if (this.isShade()) { 3036 var overlay = this.assignWaitOverlay(this.getShadeBase()); 3037 3038 if (this.shadeClass) { 3039 overlay.addClass(this.shadeClass); 3040 } 3041 3042 this.triggerVent('shaded', this); 3043 3044 } else if (this.blockWidget) { 3045 3046 this.base.click(this.blocker).focus(this.blocker); 3047 } 3048 3049 this.isShowModalScreen = true; 3050 3051 return true; 3052}; 3053 3054// Assemble overlay 3055ALoadable.prototype.assignWaitOverlay = function(base) 3056{ 3057 return assignWaitOverlay(base); 3058}; 3059 3060// Unshade widget 3061ALoadable.prototype.unshade = function() 3062{ 3063 if (!this.base || !this.isShowModalScreen || this.isLoading) { 3064 return false; 3065 } 3066 3067 if (_.result(this, 'shadeWidget')) { 3068 this.unassignWaitOverlay(this.getShadeBase()); 3069 this.triggerVent('unshaded', this); 3070 3071 } else if (this.blockWidget) { 3072 this.base.unbind('click', this.blocker).unbind('focus', this.blocker); 3073 } 3074 3075 this.isShowModalScreen = false; 3076 3077 return true; 3078}; 3079 3080ALoadable.prototype.unassignWaitOverlay = function(base) 3081{ 3082 unassignWaitOverlay(base, true); 3083}; 3084 3085ALoadable.prototype.isShade = function() 3086{ 3087 var state = { 3088 widget: this, 3089 result: _.result(this, 'shadeWidget') 3090 }; 3091 3092 this.triggerVent('shade', state); 3093 3094 return state.result; 3095}; 3096 3097// Get base element for shade / unshade operation 3098ALoadable.prototype.getShadeBase = function() { 3099 return this.base; 3100}; 3101 3102// Event blocker 3103ALoadable.prototype.blocker = function(event) { 3104 event.stopPropagation(); 3105 3106 return false; 3107}; 3108 3109// Submit specified form 3110ALoadable.prototype.submitForm = function(form, callback) 3111{ 3112 return form.submitBackground( 3113 callback, 3114 false, 3115 { 3116 rpc: 'POST' == jQuery(form).attr('method').toUpperCase() 3117 } 3118 ); 3119};; 3120/* AUTOGENERATED: xcart.utils.js */ 3121/* vim: set ts=2 sw=2 sts=2 et: */ 3122 3123/** 3124 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 3125 * See https://www.x-cart.com/license-agreement.html for license details. 3126 */ 3127 3128window.xcart.utils = { 3129 3130 /** 3131 * Generates hash from given value using md5 algorithm 3132 * @param mixed value Value to be hased 3133 * @return string MD5 hash of value 3134 */ 3135 hash: function(value) { 3136 return objectHash.MD5(value); 3137 }, 3138 3139 /** 3140 * escape some html entities 3141 * @see select2 Utils.escapeMarkup 3142 * @param string str 3143 * @returns string 3144 */ 3145 escapeString: function (str) { 3146 var replaceMap = { 3147 '\\': '\', 3148 '&': '&', 3149 '<': '<', 3150 '>': '>', 3151 '"': '"', 3152 '\'': ''', 3153 '/': '/' 3154 }; 3155 3156 // Do not try to escape the markup if it's not a string 3157 if (typeof str !== 'string') { 3158 return str; 3159 } 3160 3161 return String(str).replace(/[&<>"'\/\\]/g, function (match) { 3162 return replaceMap[match]; 3163 }); 3164 }, 3165 3166 /** 3167 * Detect SVG width/height. 3168 * 3169 * @param {string} svgContent The content of the SVG image. 3170 * 3171 * @return {{width: number, height: number}} Image width and height, or {width: 0, height: 0} in case anything has 3172 * gone wrong. 3173 */ 3174 getSvgImageSizes: function (svgContent) { 3175 const elem = document.createElement('DIV'); 3176 elem.setAttribute( 3177 'style', 3178 'position:fixed;top:-10000px;left:-10000px;width:3000px;height:3000px;opacity:0;z-index:-1000;pointer-events:none' 3179 ); 3180 document.body.appendChild(elem); 3181 3182 elem.innerHTML = svgContent; 3183 3184 const svg = elem.querySelector('svg'); 3185 let result = { 3186 width: 0, 3187 height: 0 3188 }; 3189 if (svg && svg.getBBox) { 3190 result = svg.getBBox(); 3191 } 3192 document.body.removeChild(elem); 3193 3194 return { 3195 width: Math.round(result.width), 3196 height: Math.round(result.height) 3197 }; 3198 } 3199 3200}; 3201 3202window.await = function (promises, callback) { 3203 jQuery.when.apply(jQuery, promises).done(callback); 3204}; 3205 3206// Shim array.prototype.find for es5 3207if (!Array.prototype.find) { 3208 Object.defineProperty(Array.prototype, "find", { 3209 value: function(predicate) { 3210 if (this === null) { 3211 throw new TypeError('Array.prototype.find called on null or undefined'); 3212 } 3213 if (typeof predicate !== 'function') { 3214 throw new TypeError('predicate must be a function'); 3215 } 3216 var list = Object(this); 3217 var length = list.length >>> 0; 3218 var thisArg = arguments[1]; 3219 var value; 3220 3221 for (var i = 0; i < length; i++) { 3222 value = list[i]; 3223 if (predicate.call(thisArg, value, i, list)) { 3224 return value; 3225 } 3226 } 3227 return undefined; 3228 } 3229 }); 3230}; 3231/* AUTOGENERATED: lazyload.js */ 3232/*jslint browser: true, eqeqeq: true, bitwise: true, newcap: true, immed: true, regexp: false */ 3233 3234/** 3235LazyLoad makes it easy and painless to lazily load one or more external 3236JavaScript or CSS files on demand either during or after the rendering of a web 3237page. 3238 3239Supported browsers include Firefox 3.6+, IE9+, Safari 5.1.4+ (untested) (including Mobile 3240Safari), Google Chrome 10+, and Opera 12+. Other browsers may or may not work and 3241are not officially supported, including the browsers supported by the original LazyLoad: 3242Firefox 2+, IE6+, Safari 3+, Google Chrome 0.8+, and Opera 9+ (not yet tested). 3243 3244Visit https://github.com/lewisje/lazyload/ for more info. 3245 3246Copyright (c) 2011 Ryan Grove <[email protected]> 3247All rights reserved. 3248Changes made by Cezary Daniel Nowak, 2014, and James Edward Lewis II, 2015. 3249 3250Permission is hereby granted, free of charge, to any person obtaining a copy of 3251this software and associated documentation files (the 'Software'), to deal in 3252the Software without restriction, including without limitation the rights to 3253use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 3254the Software, and to permit persons to whom the Software is furnished to do so, 3255subject to the following conditions: 3256 3257The above copyright notice and this permission notice shall be included in all 3258copies or substantial portions of the Software. 3259 3260THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 3261IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 3262FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 3263COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 3264IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 3265CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 3266 3267@module lazyload 3268@class LazyLoad 3269@static 3270*/ 3271 3272var LazyLoad = (function (doc) { 3273 'use strict'; 3274 // -- Private Variables ------------------------------------------------------ 3275 3276 // Reference to the <head> element (populated lazily). 3277 var head, 3278 3279 // Requests currently in progress, if any. 3280 pending = {}, 3281 3282 // Number of times we've polled to check whether a pending stylesheet has 3283 // finished loading. If this gets too high, we're probably stalled. 3284 pollCount = 0, 3285 3286 // Cached requests. 3287 cache = {}, 3288 3289 // Queued requests. 3290 queue = {css: [], js: []}, 3291 3292 // Whether Function#bind exists. 3293 canBind = typeof Function.prototype.bind === 'function', 3294 3295 // Reference to the browser's list of stylesheets. 3296 styleSheets = doc.styleSheets, 3297 finishCSS = canBind ? finish.bind(doc, 'css') : function finishCSS() {finish('css');}, 3298 ua = navigator.userAgent, 3299 // User agent and feature test information. 3300 env = { 3301 // True if this browser supports disabling async mode on dynamically 3302 // created script nodes. See 3303 // http://wiki.whatwg.org/wiki/Dynamic_Script_Execution_Order 3304 async: createNode('script').async === true 3305 }; 3306
3307 if (/AppleWebKit\//.test(ua)) env.webkit = true; 3308 else if (/MSIE|Trident/.test(ua)) env.ie = true; 3309 else if (/Opera/.test(ua)) env.opera = true; 3310 else if (/Gecko\//.test(ua)) env.gecko = true; 3311 else env.unknown = true; 3312 // -- Private Methods -------------------------------------------------------- 3313 3314 /** 3315 Creates and returns an HTML element with the specified name and attributes. 3316 3317 @method createNode 3318 @param {String} name element name 3319 @param {Object} attrs name/value mapping of element attributes 3320 @return {HTMLElement} 3321 @private 3322 */ 3323 function createNode(name, attrs) { 3324 var attr, 3325 node = doc.createElement(name); 3326 3327 if(attrs) { 3328 for (attr in attrs) { 3329 if (attrs.hasOwnProperty(attr)) { 3330 node.setAttribute(attr, attrs[attr]); 3331 } 3332 } 3333 } 3334 3335 return node; 3336 } 3337 3338 /** 3339 Called when the current pending resource of the specified type has finished 3340 loading. Executes the associated callback (if any) and loads the next 3341 resource in the queue. 3342 3343 @method finish 3344 @param {String} type resource type ('css' or 'js') 3345 @private 3346 */ 3347 function finish(type) { 3348 var p = pending[type], callback, urls; 3349 3350 if (p) { 3351 callback = p.callback; 3352 urls = p.urls; 3353 3354 cache[urls.shift()] = true; 3355 pollCount = 0; 3356 3357 // If this is the last of the pending URLs, execute the callback and 3358 // start the next request in the queue (if any). 3359 if (!urls.length) { 3360 if (typeof callback === 'function') callback.call(p.context, p.obj); 3361 pending[type] = 0; 3362 if (queue[type].length) load(type); 3363 } 3364 } 3365 } 3366 3367 /** 3368 Loads the specified resources, or the next resource of the specified type 3369 in the queue if no resources are specified. If a resource of the specified 3370 type is already being loaded, the new request will be queued until the 3371 first request has been finished. 3372 3373 When an array of resource URLs is specified, those URLs will be loaded in 3374 parallel if it is possible to do so while preserving execution order. All 3375 browsers support parallel loading of CSS, but only Firefox and Opera 3376 support parallel loading of scripts. In other browsers, scripts will be 3377 queued and loaded one at a time to ensure correct execution order. 3378 3379 @method load 3380 @param {String} type resource type ('css' or 'js') 3381 @param {String|Array} urls (optional) URL or array of URLs to load 3382 @param {Function} callback (optional) callback function to execute when the 3383 resource is loaded 3384 @param {Object} obj (optional) object to pass to the callback function 3385 @param {Object} context (optional) if provided, the callback function will 3386 be executed in this object's context 3387 @private 3388 */ 3389 function load(type, urls, callback, obj, context) { 3390 var _finish = canBind ? finish.bind(doc, type) : function _finish() {finish(type);}, 3391 isCSS = type === 'css', nodes = [], i, len, node, p, pendingUrls, url; 3392 3393 if (urls) { 3394 // If urls is a string, wrap it in an array. Otherwise assume it's an 3395 // array and create a copy of it so modifications won't be made to the 3396 // original. 3397 urls = typeof urls === 'string' ? [urls] : urls.slice(); 3398 3399 // Create a request object for each URL. If multiple URLs are specified, 3400 // the callback will only be executed after all URLs have been loaded. 3401 // 3402 // Sadly, Firefox and Opera are the only browsers capable of loading 3403 // scripts in parallel while preserving execution order. In all other 3404 // browsers, scripts must be loaded sequentially. 3405 // 3406 // All browsers respect CSS specificity based on the order of the link 3407 // elements in the DOM, regardless of the order in which the stylesheets 3408 // are actually downloaded. 3409 if (isCSS || env.async || env.gecko || env.opera) { 3410 // Load in parallel. 3411 queue[type].push({ 3412 urls : urls, 3413 callback: callback, 3414 obj : obj, 3415 context : context 3416 }); 3417 } else { 3418 // Load sequentially. 3419 for (i = 0, len = urls.length; i < len; ++i) { 3420 queue[type].push({ 3421 urls : [urls[i]], 3422 callback: i === len - 1 ? callback : 0, // callback is only added to the last URL 3423 obj : obj, 3424 context : context 3425 }); 3426 } 3427 } 3428 } 3429 3430 // If a previous load request of this type is currently in progress, we'll 3431 // wait our turn. Otherwise, grab the next item in the queue. 3432 if (pending[type] || !(p = pending[type] = queue[type].shift())) return; 3433 head = head || doc.head || doc.getElementsByTagName('head')[0]; 3434 pendingUrls = p.urls.slice(); 3435 3436 var nodeReady = function nodeReady() { 3437 if (/^(?:loaded|complete)$/i.test(node.readyState)) { 3438 node.onreadystatechange = null; 3439 _finish(); 3440 } 3441 }; 3442 for (i = 0, len = pendingUrls.length; i < len; ++i) { 3443 url = pendingUrls[i]; 3444 if(cache[url] != null && !url.startsWith("var/theme/custom.css")) { 3445 // _finish here can cause unexpected behavior when cache[url] === false but 3446 // I won't figure out solution, since first issue on github :-) 3447 _finish(); 3448 continue; //prevent scripts/css from being loaded multiple times 3449 } else { 3450 cache[url] = false;
3451 } 3452 if (isCSS) { 3453 node = env.gecko ? createNode('style') : createNode('link', { 3454 href: url, 3455 rel : 'stylesheet' 3456 }); 3457 } else { 3458 node = createNode('script', {src: url}); 3459 node.async = false; 3460 } 3461 3462 node.className = 'lazyload'; 3463 node.setAttribute('charset', 'utf-8'); 3464 3465 if (env.ie && !isCSS && 'onreadystatechange' in node && !('draggable' in node)) { 3466 node.onreadystatechange = nodeReady; 3467 } else if (isCSS && (env.gecko || env.webkit)) { 3468 // Gecko and WebKit don't support the onload event on link nodes. 3469 if (env.webkit) { 3470 // In WebKit, we can poll for changes to document.styleSheets to 3471 // figure out when stylesheets have loaded. 3472 p.urls[i] = node.href; // resolve relative URLs (or polling won't work) 3473 pollWebKit(); 3474 } else { 3475 // In Gecko, we can import the requested URL into a <style> node and 3476 // poll for the existence of node.sheet.cssRules. Props to Zach 3477 // Leatherman for calling my attention to this technique. 3478 node.innerHTML = '@import "' + url + '";'; 3479 pollGecko(node); 3480 } 3481 } else { 3482 node.onload = node.onerror = _finish; 3483 } 3484 nodes.push(node); 3485 } 3486 for (i = 0, len = nodes.length; i < len; ++i) { 3487 head.appendChild(nodes[i]); 3488 } 3489 } 3490 3491 /** 3492 Begins polling to determine when the specified stylesheet has finished loading 3493 in Gecko. Polling stops when all pending stylesheets have loaded or after 10 3494 seconds (to prevent stalls). 3495 3496 Thanks to Zach Leatherman for calling my attention to the @import-based 3497 cross-domain technique used here, and to Oleg Slobodskoi for an earlier 3498 same-domain implementation. See Zach's blog for more details: 3499 http://www.zachleat.com/web/2010/07/29/load-css-dynamically/ 3500 3501 @method pollGecko 3502 @param {HTMLElement} node Style node to poll. 3503 @private 3504 */ 3505 function pollGecko(node) { 3506 var hasRules = 'sheet' in node && node.sheet && 'cssRules' in node.sheet; 3507 3508 if (!hasRules) { 3509 // The stylesheet is still loading. 3510 ++pollCount; 3511 if (pollCount < 200) { 3512 setTimeout(canBind ? pollGecko.bind(doc, node) : function pollBind() {pollGecko(node);}, 50); 3513 } else { 3514 // We've been polling for 10 seconds and nothing's happened. Stop 3515 // polling and finish the pending requests to avoid blocking further 3516 // requests. 3517 if (hasRules) finishCSS(); 3518 } 3519 return; 3520 } 3521 // If we get here, the stylesheet has loaded. 3522 finishCSS(); 3523 } 3524 3525 /** 3526 Begins polling to determine when pending stylesheets have finished loading 3527 in WebKit. Polling stops when all pending stylesheets have loaded or after 10 3528 seconds (to prevent stalls). 3529 3530 @method pollWebKit 3531 @private 3532 */ 3533 function pollWebKit() { 3534 var css = pending.css, i; 3535 3536 if (css) { 3537 i = styleSheets.length; 3538 // Look for a stylesheet matching the pending URL. 3539 while (--i >= 0) { 3540 if (styleSheets[i].href === css.urls[0]) { 3541 finishCSS(); 3542 break; 3543 } 3544 } 3545 3546 ++pollCount; 3547 if (css) { 3548 if (pollCount < 200) { 3549 setTimeout(pollWebKit, 50); 3550 } else { 3551 // We've been polling for 10 seconds and nothing's happened, which may 3552 // indicate that the stylesheet has been removed from the document 3553 // before it had a chance to load. Stop polling and finish the pending 3554 // request to prevent blocking further requests. 3555 finishCSS(); 3556 } 3557 } 3558 } 3559 } 3560 3561 return { 3562 /** 3563 Requests the specified CSS URL or URLs and executes the specified 3564 callback (if any) when they have finished loading. If an array of URLs is 3565 specified, the stylesheets will be loaded in parallel and the callback 3566 will be executed after all stylesheets have finished loading. 3567 3568 @method css 3569 @param {String|Array} urls CSS URL or array of CSS URLs to load 3570 @param {Function} callback (optional) callback function to execute when 3571 the specified stylesheets are loaded 3572 @static 3573 */ 3574 css: canBind ? load.bind(load, 'css') : function css(urls, callback, obj, context) { 3575 load('css', urls, callback, obj, context); 3576 }, 3577 3578 /** 3579 Requests the specified JavaScript URL or URLs and executes the specified 3580 callback (if any) when they have finished loading. If an array of URLs is 3581 specified and the browser supports it, the scripts will be loaded in 3582 parallel and the callback will be executed after all scripts have 3583 finished loading. 3584
3585 Currently, only Firefox and Opera support parallel loading of scripts while 3586 preserving execution order. In other browsers, scripts will be 3587 queued and loaded one at a time to ensure correct execution order. 3588 3589 @method js 3590 @param {String|Array} urls JS URL or array of JS URLs to load 3591 @param {Function} callback (optional) callback function to execute when 3592 the specified scripts are loaded 3593 @static 3594 */ 3595 js: canBind ? load.bind(load, 'js') : function js(urls, callback, obj, context) { 3596 load('js', urls, callback, obj, context); 3597 } 3598 }; 3599})(this.document);; 3600/* AUTOGENERATED: json5.min.js */ 3601!function(u,D){"object"==typeof exports&&"undefined"!=typeof module?module.exports=D():"function"==typeof define&&define.amd?define(D):u.JSON5=D()}(this,function(){"use strict";var u={Space_Separator:/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ID_Start:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFB
3601D3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,ID_Continue:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFB
3601D3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},D={isSpaceSeparator:D=>u.Space_Separator.test(D),isIdStartChar:D=>D>="a"&&D<="z"||D>="A"&&D<="Z"||"$"===D||"_"===D||u.ID_Start.test(D),isIdContinueChar:D=>D>="a"&&D<="z"||D>="A"&&D<="Z"||D>="0"&&D<="9"||"$"===D||"_"===D||"â"===D||"â"===D||u.ID_Continue.test(D),isDigit:u=>/[0-9]/.test(u),isHexDigit:u=>/[0-9A-Fa-f]/.test(u)};let F,e,C,A,E,t,r,n,i;let B,a,o,c,s;function f(){for(B="default",a="",o=!1,c=1;;){s=l();const u=h[B]();if(u)return u}}function l(){if(F[A])return String.fromCodePoint(F.codePointAt(A))}function d(){const u=l();return"\n"===u?(E++,t=0):u?t+=u.length:t++,u&&(A+=u.length),u}const h={default(){switch(s){case"\t":case"\v":case"\f":case" ":case" ":case"\ufeff":case"\n":case"\r":case"\u2028":case"\u2029":return void d();case"/":return d(),void(B="comment");case void 0:return d(),m("eof")}
vendor: 4,211 bytes, line 3601
3601if(!D.isSpaceSeparator(s))return h[e]();d()},comment(){switch(s){case"*":return d(),void(B="multiLineComment");case"/":return d(),void(B="singleLineComment")}throw b(d())},multiLineComment(){switch(s){case"*":return d(),void(B="multiLineCommentAsterisk");case void 0:throw b(d())}d()},multiLineCommentAsterisk(){switch(s){case"*":return void d();case"/":return d(),void(B="default");case void 0:throw b(d())}d(),B="multiLineComment"},singleLineComment(){switch(s){case"\n":case"\r":case"\u2028":case"\u2029":return d(),void(B="default");case void 0:return d(),m("eof")}d()},value(){switch(s){case"{":case"[":return m("punctuator",d());case"n":return d(),p("ull"),m("null",null);case"t":return d(),p("rue"),m("boolean",!0);case"f":return d(),p("alse"),m("boolean",!1);case"-":case"+":return"-"===d()&&(c=-1),void(B="sign");case".":return a=d(),void(B="decimalPointLeading");case"0":return a=d(),void(B="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return a=d(),void(B="decimalInteger");case"I":return d(),p("nfinity"),m("numeric",1/0);case"N":return d(),p("aN"),m("numeric",NaN);case'"':case"'":return o='"'===d(),a="",void(B="string")}throw b(d())},identifierNameStartEscape(){if("u"!==s)throw b(d());d();const u=v();switch(u){case"$":case"_":break;default:if(!D.isIdStartChar(u))throw S()}a+=u,B="identifierName"},identifierName(){switch(s){case"$":case"_":case"â":case"â":return void(a+=d());case"\\":return d(),void(B="identifierNameEscape")}if(!D.isIdContinueChar(s))return m("identifier",a);a+=d()},identifierNameEscape(){if("u"!==s)throw b(d());d();const u=v();switch(u){case"$":case"_":case"â":case"â":break;default:if(!D.isIdContinueChar(u))throw S()}a+=u,B="identifierName"},sign(){switch(s){case".":return a=d(),void(B="decimalPointLeading");case"0":return a=d(),void(B="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return a=d(),void(B="decimalInteger");case"I":return d(),p("nfinity"),m("numeric",c*(1/0));case"N":return d(),p("aN"),m("numeric",NaN)}throw b(d())},zero(){switch(s){case".":return a+=d(),void(B="decimalPoint");case"e":case"E":return a+=d(),void(B="decimalExponent");case"x":case"X":return a+=d(),void(B="hexadecimal")}return m("numeric",0*c)},decimalInteger(){switch(s){case".":return a+=d(),void(B="decimalPoint");case"e":case"E":return a+=d(),void(B="decimalExponent")}if(!D.isDigit(s))return m("numeric",c*Number(a));a+=d()},decimalPointLeading(){if(D.isDigit(s))return a+=d(),void(B="decimalFraction");throw b(d())},decimalPoint(){switch(s){case"e":case"E":return a+=d(),void(B="decimalExponent")}return D.isDigit(s)?(a+=d(),void(B="decimalFraction")):m("numeric",c*Number(a))},decimalFraction(){switch(s){case"e":case"E":return a+=d(),void(B="decimalExponent")}if(!D.isDigit(s))return m("numeric",c*Number(a));a+=d()},decimalExponent(){switch(s){case"+":case"-":return a+=d(),void(B="decimalExponentSign")}if(D.isDigit(s))return a+=d(),void(B="decimalExponentInteger");throw b(d())},decimalExponentSign(){if(D.isDigit(s))return a+=d(),void(B="decimalExponentInteger");throw b(d())},decimalExponentInteger(){if(!D.isDigit(s))return m("numeric",c*Number(a));a+=d()},hexadecimal(){if(D.isHexDigit(s))return a+=d(),void(B="hexadecimalInteger");throw b(d())},hexadecimalInteger(){if(!D.isHexDigit(s))return m("numeric",c*Number(a));a+=d()},string(){switch(s){case"\\":return d(),void(a+=function(){switch(l()){case"b":return d(),"\b";case"f":return d(),"\f";case"n":return d(),"\n";case"r":return d(),"\r";case"t":return d(),"\t";case"v":return d(),"\v";case"0":if(d(),D.isDigit(l()))throw b(d());return"\0";case"x":return d(),function(){let u="",F=l();if(!D.isHexDigit(F))throw b(d());if(u+=d(),F=l(),!D.isHexDigit(F))throw b(d());return u+=d(),String.fromCodePoint(parseInt(u,16))}();case"u":return d(),v();case"\n":case"\u2028":case"\u2029":return d(),"";case"\r":return d(),"\n"===l()&&d(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case void 0:throw b(d())}return d()}());case'"':return o?(d(),m("string",a)):void(a+=d());case"'":return o?void(a+=d()):(d(),m("string",a));case"\n":case"\r":throw b(d());case"\u2028":case"\u2029":!function(u){console.warn(`JSON5: '${x(u)}
3601' in strings is not valid ECMAScript; consider escaping`)}(s);break;case void 0:throw b(d())}a+=d()},start(){switch(s){case"{":case"[":return m("punctuator",d())}B="value"},beforePropertyName(){switch(s){case"$":case"_":return a=d(),void(B="identifierName");case"\\":return d(),void(B="identifierNameStartEscape");case"}":return m("punctuator",d());case'"':case"'":return o='"'===d(),void(B="string")}if(D.isIdStartChar(s))return a+=d(),void(B="identifierName");throw b(d())},afterPropertyName(){if(":"===s)return m("punctuator",d());throw b(d())},beforePropertyValue(){B="value"},afterPropertyValue(){switch(s){case",":case"}":return m("punctuator",d())}throw b(d())},beforeArrayValue(){if("]"===s)return m("punctuator",d());B="value"},afterArrayValue(){switch(s){case",":case"]":return m("punctuator",d())}throw b(d())},end(){throw b(d())}};function m(u,D){return{type:u,value:D,line:E,column:t}}function p(u){for(const D of u){if(l()!==D)throw b(d());d()}}function v(){let u="",F=4;for(;F-- >0;){const F=l();if(!D.isHexDigit(F))throw b(d());u+=d()}return String.fromCodePoint(parseInt(u,16))}const g={start(){if("eof"===r.type)throw N();y()},beforePropertyName(){switch(r.type){case"identifier":case"string":return n=r.value,void(e="afterPropertyName");case"punctuator":return void w();case"eof":throw N()}},afterPropertyName(){if("eof"===r.type)throw N();e="beforePropertyValue"},beforePropertyValue(){if("eof"===r.type)throw N();y()},beforeArrayValue(){if("eof"===r.type)throw N();"punctuator"!==r.type||"]"!==r.value?y():w()},afterPropertyValue(){if("eof"===r.type)throw N();switch(r.value){case",":return void(e="beforePropertyName");case"}":w()}},afterArrayValue(){if("eof"===r.type)throw N();switch(r.value){case",":return void(e="beforeArrayValue");case"]":w()}},end(){}};function y(){let u;switch(r.type){case"punctuator":switch(r.value){case"{":u={};break;case"[":u=[]}break;case"null":case"boolean":case"numeric":case"string":u=r.value}if(void 0===i)i=u;else{const D=C[C.length-1];Array.isArray(D)?D.push(u):D[n]=u}if(null!==u&&"object"==typeof u)C.push(u),e=Array.isArray(u)?"beforeArrayValue":"beforePropertyName";else{const u=C[C.length-1];e=null==u?"end":Array.isArray(u)?"afterArrayValue":"afterPropertyValue"}}function w(){C.pop();const u=C[C.length-1];e=null==u?"end":Array.isArray(u)?"afterArrayValue":"afterPropertyValue"}function b(u){return P(void 0===u?`JSON5: invalid end of input at ${E}:${t}`:`JSON5: invalid character '${x(u)}' at ${E}:${t}`)}function N(){return P(`JSON5: invalid end of input at ${E}:${t}`)}function S(){return P(`JSON5: invalid identifier character at ${E}:${t-=5}`)}function x(u){const D={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(D[u])return D[u];if(u<" "){const D=u.charCodeAt(0).toString(16);return"\\x"+("00"+D).substring(D.length)}return u}function P(u){const D=new SyntaxError(u);return D.lineNumber=E,D.columnNumber=t,D}return{parse:function(u,D){F=String(u),e="start",C=[],A=0,E=1,t=0,r=void 0,n=void 0,i=void 0;do{r=f(),g[e]()}while("eof"!==r.type);return"function"==typeof D?function u(D,F,e){const C=D[F];if(null!=C&&"object"==typeof C)for(const D in C){const F=u(C,D,e);void 0===F?delete C[D]:C[D]=F}return e.call(D,F,C)}({"":i},"",D):i},stringify:function(u,F,e){const C=[];let A,E,t,r="",n="";if(null==F||"object"!=typeof F||Array.isArray(F)||(e=F.space,t=F.quote,F=F.replacer),"function"==typeof F)E=F;else if(Array.isArray(F)){A=[];for(const u of F){let D;"string"==typeof u?D=u:("number"==typeof u||u instanceof String||u instanceof Number)&&(D=String(u)),void 0!==D&&A.indexOf(D)<0&&A.push(D)}}return e instanceof Number?e=Number(e):e instanceof String&&(e=String(e)),"number"==typeof e?e>0&&(e=Math.min(10,Math.floor(e)),n=" ".substr(0,e)):"string"==typeof e&&(n=e.substr(0,10)),i("",{"":u});function i(u,D){let F=D[u];switch(null!=F&&("function"==typeof F.toJSON5?F=F.toJSON5(u):"function"==typeof F.toJSON&&(F=F.toJSON(u))),E&&(F=E.call(D,u,F)),F instanceof Number?F=Number(F):F instanceof String?F=String(F):F instanceof Boolean&&(F=F.valueOf()),F){case null:return"null";case!0:return"true";case!1:return"false"}return"string"==typeof F?B(F):"number"==typeof F?String(F):"object"==typeof F?Array.isArray(F)?function(u){if(C.indexOf(u)>=0)throw TypeError("Converting circular structure to JSON5");C.push(u);let D=r;r+=n;let F,e=[];for(let D=0;D<u.length;D++){const F=i(String(D),u);e.push(void 0!==F?F:"null")}if(0===e.length)F="[]";else if(""===n){let u=e.join(",");F="["+u+"]"}else{let u=",\n"+r,C=e.join(u);F="[\n"+r+C+",\n"+D+"]"}return C.pop(),r=D,F}(F):function(u){if(C.indexOf(u)>=0)throw TypeError("Converting circular structure to JSON5");C.push(u);let D=r;r+=n;let F,e=A||Object.keys(u),E=[];for(const D of e){const F=i(D,u);if(void 0!==F){let u=a(D)+":";""!==n&&(u+=" "),u+=F,E.push(u)}}if(0===E.length)F="{}";else{let u;if(""===n)u=E.join(","),F="{"+u+"}";else{let e=",\n"+r;u=E.join(e),F="{\n"+r+u+",\n"+D+"}"}}return C.pop(),r=D,F}(F):void 0}function B(u){const D={"'":.1,'"':.2},F={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let e="";for(const C of u){switch(C){case"'":case'"':D[C]++,e+=C;continue}if(F[C])e+=F[C];else if(C<" "){let u=C.charCodeAt(0).toString(16);
3601e+="\\x"+("00"+u).substring(u.length)}else e+=C}const C=t||Object.keys(D).reduce((u,F)=>D[u]<D[F]?u:F);return C+(e=e.replace(new RegExp(C,"g"),F[C]))+C}function a(u){if(0===u.length)return B(u);const F=String.fromCodePoint(u.codePointAt(0));if(!D.isIdStartChar(F))return B(u);for(let e=F.length;e<u.length;e++)if(!D.isIdContinueChar(String.fromCodePoint(u.codePointAt(e))))return B(u);return u}}}});; 3602/* AUTOGENERATED: xcart.form.js */ 3603/* vim: set ts=2 sw=2 sts=2 et: */ 3604 3605/** 3606 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 3607 * See https://www.x-cart.com/license-agreement.html for license details. 3608 */ 3609 3610/** 3611 * Form 3612 */ 3613 3614// Constructor 3615function CommonForm(form) 3616{ 3617 if (!form) { 3618 return false; 3619 } 3620 3621 form = jQuery(form).filter('form').eq(0); 3622 if (!form.length || form.get(0).commonController) { 3623 return false; 3624 } 3625 3626 this.form = form.get(0); 3627 this.$form = form; 3628 3629 var o = this; 3630 3631 this.form.commonController = this; 3632 3633 if (!this.form.getAttribute('id')) { 3634 var d = new Date(); 3635 this.form.setAttribute('id', 'form-' + d.getTime()); 3636 } 3637 3638 var methods = [ 3639 'validate', 'submitBackground', 'isChanged', 'getElements' 3640 ]; 3641 3642 for (var i = 0; i < methods.length; i++) { 3643 var method = methods[i]; 3644 this.form[method] = new Function('', 'return this.commonController.' + method + '.apply(this.commonController, arguments);'); 3645 } 3646 3647 this.form.isBgSubmitting = false; 3648 3649 // Central validation before form submit and background submit 3650 form.submit( 3651 function(event) 3652 { 3653 jQuery('input', this).trigger('sanitize'); 3654 3655 if (this.isBgSubmitting) { 3656 return false; 3657 } 3658 3659 o.triggerVent('submit.prevalidate', o); 3660 3661 var result = this.validate(); 3662 3663 if (result && o.submitOnlyChanged && !o.isChanged(true)) { 3664 result = false;
3665 } 3666 3667 // Trigger the validationSuccess or validationFailure events accordingly the validation result 3668 var validationEvent = jQuery.Event(result ? 'validationSuccess' : 'validationFailure'); 3669 o.$form.trigger(validationEvent); 3670 3671 if (result && o.backgroundSubmit) { 3672 var e = jQuery.Event('beforeSubmit'); 3673 o.$form.trigger(e); 3674 3675 o.triggerVent('submit.postvalidate', o); 3676 3677 if (e.result !== false) { 3678 o.unmarkAsInvalid(); 3679 if (o.submitBackground(null, true)) { 3680 result = false; 3681 } 3682 } 3683 3684 } else if (result) { 3685 o.unmarkAsInvalid(); 3686 } 3687 3688 return result; 3689 } 3690 ); 3691 3692 this.bindElements(); 3693 3694 // Process invalidElement event 3695 xcart.bind( 3696 'invalidElement', 3697 function(event, data) { 3698 if (o.form.isBgSubmitting && o.form.elements.namedItem(data.name)) { 3699 o.form.elements.namedItem(data.name).markAsInvalid(data.message, null, true); 3700 } 3701 } 3702 ); 3703 3704 // Process invalidForm event 3705 xcart.bind( 3706 'invalidForm', 3707 function(event, data) { 3708 if (data.name && o.$form.is('.' + data.name)) { 3709 o.markAsInvalid(data.message); 3710 o.triggerVent( 3711 'invalid.form', 3712 _.extend(_.clone(data), {widget: o}) 3713 ); 3714 } 3715 } 3716 ); 3717 3718 var triggerStateEvents = function(form) { 3719 if (form.get(0).commonController.isChanged()) { 3720 form.addClass('changed'); 3721 form.trigger('state-changed', { 3722 valid: form.get(0).commonController.validate(true) 3723 }); 3724 3725 } else { 3726 form.removeClass('changed'); 3727 form.trigger('state-initial'); 3728 } 3729 }; 3730 3731 var debouncedTriggerStateEvents = _.debounce(triggerStateEvents, 100); 3732 3733 var changeHandler = function (event) { 3734 var obj = event.target || event.srcElement; 3735 var form = jQuery(this); 3736 3737 if ( 3738 !obj 3739 || !jQuery(obj) 3740 || !jQuery(obj).hasClass('not-significant') 3741 ) { 3742 debouncedTriggerStateEvents(form); 3743 } 3744 3745 if (!jQuery(obj).hasClass('selectAll')) { 3746 if (form.find('input.selector:checked').length > 0) { 3747 if (!form.hasClass('more-action-enabled')) { 3748 form.addClass('more-action-enabled'); 3749 form.trigger('more-action-enabled'); 3750 } 3751 3752 } else if (form.hasClass('more-action-enabled')) { 3753 form.removeClass('more-action-enabled'); 3754 form.trigger('more-action-initial'); 3755 } 3756 } 3757 3758 var state = this.commonController.checkDependencyState(); 3759 this.commonController.setDependencyState(state); 3760 }; 3761 3762 form.change(changeHandler); 3763 3764 var state = this.checkDependencyState(); 3765 this.setDependencyState(state); 3766 3767 this.triggerVent('initialized', this); 3768} 3769 3770extend(CommonForm, Base); 3771 3772// Element controllers 3773CommonForm.elementControllers = []; 3774 3775// Autoload class method 3776CommonForm.autoload = function() 3777{ 3778 jQuery('form').each( 3779 function() { 3780 new CommonForm(this); 3781 } 3782 ); 3783}; 3784 3785// Autoassign class method 3786CommonForm.autoassign = function(base) 3787{ 3788 jQuery('form', base).each( 3789 function() { 3790 new CommonForm(this); 3791 } 3792 ); 3793 3794 jQuery(base).parents('form').each( 3795 function() { 3796 if (typeof(this.commonController) !== 'undefined') { 3797 this.commonController.bindElements(); 3798 } 3799 } 3800 ); 3801}; 3802 3803// Form DOM element 3804CommonForm.prototype.form = null; 3805 3806// Form jQuery element 3807CommonForm.prototype.$form = null; 3808 3809CommonForm.prototype.blurTTL = 300; 3810 3811CommonForm.prototype.elementBlurTO = null; 3812 3813CommonForm.prototype.isFocus = false; 3814/** 3815 * Options 3816 */ 3817 3818// Auto-submit form in background mode 3819CommonForm.prototype.backgroundSubmit = false; 3820 3821// Submit form ony if form changed 3822CommonForm.prototype.submitOnlyChanged = false; 3823 3824// POST request as RPC-request 3825CommonForm.prototype.postAsRPC = true; 3826 3827// GET request as RPC-request 3828CommonForm.prototype.getAsRPC = false; 3829 3830CommonForm.prototype.errorPlace = null; 3831 3832CommonForm.prototype.formIdName = 'xcart_form_id'; 3833// Get elements jQuery collection 3834CommonForm.prototype.getElements = function() 3835{ 3836 var data = { 3837 widget: this, 3838 list: this.$form.find(':input, .separator h2') 3839 }; 3840 3841 this.triggerVent('filterElements', data); 3842 3843 return data.list; 3844}; 3845 3846// Bind form elements 3847CommonForm.prototype.bindElements = function() 3848{ 3849 var o = this; 3850 var form = this.$form; 3851 3852 this.getElements().each( 3853 function() { 3854 if (typeof(this.commonController) === 'undefined') { 3855 var elm = new CommonElement(this); 3856 3857 jQuery.each( 3858 CommonForm.elementControllers, 3859 function (i, controller) { 3860 if (typeof(controller) === 'function') { 3861 3862 // Controller is function-handler 3863 controller.call(elm); 3864 } 3865 } 3866 ); 3867 3868 this.commonController.bind('local.blur', _.bind(o.handleElementBlur, o));
3869 this.commonController.bind('local.focus', _.bind(o.handleElementFocus, o)); 3870 } 3871 } 3872 ); 3873 3874 jQuery.each( 3875 CommonForm.elementControllers, 3876 function (i, controller) { 3877 if ( 3878 typeof(controller) === 'object' 3879 && form.find(controller.pattern).length > 0 3880 && (typeof(controller.condition) === 'undefined' || form.find(controller.condition).length > 0) 3881 ) { 3882 3883 // Controller is { pattern: '.element', handler: function () { ... } } 3884 form.find(controller.pattern).each( 3885 function () { 3886 if (typeof(this.assignedElementControllers) === 'undefined') { 3887 this.assignedElementControllers = []; 3888 } 3889 3890 if (jQuery.inArray(i, this.assignedElementControllers) == -1) { 3891 controller.handler.call(this, form); 3892 this.assignedElementControllers.push(i); 3893 } 3894 } 3895 ); 3896 } 3897 } 3898 ); 3899 3900 // Cancel button 3901 this.$form.find('.form-cancel') 3902 .not('.assigned') 3903 .click( 3904 function (event) { 3905 event.stopPropagation(); 3906 var form = jQuery(this).not('.disabled').parents('form').get(0); 3907 if (form ) { 3908 form.commonController.undo(); 3909 } 3910 3911 return false; 3912 } 3913 ) 3914 .addClass('assigned'); 3915}; 3916 3917// Validate form 3918CommonForm.prototype.validate = function(options) 3919{ 3920 var silent = options; 3921 var focus = true; 3922 if (typeof(options) === 'object') { 3923 var silent = typeof(options.silent) !== 'undefined' ? options.silent : false; 3924 var focus = typeof(options.focus) !== 'undefined' ? options.focus : true; 3925 } 3926 3927 var options = focus !== false; 3928 var all = this.getElements(); 3929 var failed = all.filter('input,select,textarea').filter( 3930 function() { 3931 return this.commonController && !this.commonController.validate(silent); 3932 } 3933 ); 3934 3935 var state = { 3936 'widget': this, 3937 'result': failed.length == 0, 3938 'all': all, 3939 'failed': failed 3940 }; 3941 this.triggerVent('validate', state); 3942 3943 if (!state.result && !silent && focus) { 3944 this.focusOnFirstInvalid(); 3945 } 3946 3947 return state.result; 3948}; 3949 3950CommonForm.prototype.focusOnFirstInvalid = function(message) 3951{ 3952 var elm = this.getElements().filter('.validation-error').eq(0); 3953 if (elm.length) { 3954 elm.focus(); 3955 } 3956}; 3957 3958CommonForm.prototype.markAsInvalid = function(message) 3959{ 3960 this.getErrorPlace() 3961 .html(message) 3962 .show(); 3963 3964 this.$form.addClass('invalid-form'); 3965}; 3966 3967CommonForm.prototype.unmarkAsInvalid = function() 3968{ 3969 this.getErrorPlace() 3970 .hide(); 3971 3972 this.$form.removeClass('invalid-form'); 3973}; 3974 3975CommonForm.prototype.getFormId = function () { 3976 return this.$form 3977 .find('input[type="hidden"]') 3978 .filter('input[name="' + this.formIdName + '"]').eq(0) 3979 .val(); 3980}; 3981 3982CommonForm.prototype.replaceCSRFToken = function (value) { 3983 return this.$form 3984 .find('input[type="hidden"]') 3985 .filter('input[name="' + this.formIdName + '"]').eq(0) 3986 .val(value); 3987}; 3988 3989CommonForm.prototype.getErrorPlace = function () { 3990 if (!this.errorPlace) { 3991 this.errorPlace = jQuery('<div></div>') 3992 .addClass('form-error') 3993 .hide() 3994 .insertBefore(this.$form.children().eq(0)); 3995 } 3996 3997 return this.errorPlace; 3998}; 3999 4000// Undo all changes 4001CommonForm.prototype.undo = function () { 4002 this.getElements().filter('input,select,textarea').each(function () { 4003 this.commonController.undo(); 4004 }); 4005 this.$form.trigger('undo'); 4006 this.$form.change(); 4007}; 4008 4009// Enabled background submit mode and set callbacks 4010CommonForm.prototype.enableBackgroundSubmit = function(beforeCallback, afterCallback) { 4011 this.backgroundSubmit = true; 4012 4013 if (beforeCallback) { 4014 this.$form.bind('beforeSubmit', beforeCallback); 4015 } 4016 4017 if (afterCallback) { 4018 this.$form.bind('afterSubmit', afterCallback); 4019 } 4020 4021 return this; 4022}; 4023 4024// Submit form in background mode 4025CommonForm.prototype.submitBackground = function(callback, disableValidation, options) 4026{ 4027 var result = false;
4028 4029 if (disableValidation || this.form.validate()) { 4030 4031 var state = { 4032 'widget': this, 4033 'state': true 4034 }; 4035 4036 this.triggerVent('beforeSubmit', state); 4037 if (!state.state) { 4038 return result; 4039 } 4040 4041 this.preprocessBackgroundSubmit(); 4042 4043 var o = this; 4044 4045 var isPOST = this.$form.attr('method').toUpperCase() == 'POST'; 4046 var method = isPOST ? 'post' : 'get'; 4047 4048 options = options || {}; 4049 4050 if ( 4051 typeof(options.rpc) === 'undefined' 4052 && ((isPOST && this.postAsRPC) || (!isPOST && this.getAsRPC)) 4053 ) { 4054 options.rpc = true; 4055 } 4056 4057 if (typeof(options.timeout) === 'undefined') { 4058 options.timeout = 60000; 4059 } 4060 4061 result = xcart[method]( 4062 this.$form.attr('action'), 4063 function(XMLHttpRequest, textStatus, data, isValid) { 4064 var args = { 4065 'XMLHttpRequest': XMLHttpRequest, 4066 'textStatus': textStatus, 4067 'data': data, 4068 'isValid': isValid 4069 }; 4070 o.postprocessBackgroundSubmit(); 4071 o.tryRestoreCSRFToken(XMLHttpRequest); 4072 o.$form.trigger('afterSubmit', args); 4073 o.triggerVent('submitted', args); 4074 if (isValid) { 4075 o.triggerVent('submit.success', args); 4076 4077 } else { 4078 o.triggerVent('submit.error', args); 4079 } 4080 4081 return callback ? callback(XMLHttpRequest, textStatus, data, isValid) : true; 4082 },
4083 this.getSerializedValues(), 4084 options 4085 ); 4086 4087 if (result) { 4088 this.form.currentSubmitXHR = result; 4089 4090 } else { 4091 xcart.showInternalError(); 4092 } 4093 4094 this.triggerVent('afterSubmit', {'widget': this, 'state': result, 'arguments': arguments}); 4095 } 4096 4097 return result; 4098}; 4099 4100CommonForm.prototype.getSerializedValues = function() 4101{ 4102 return this.getElements().serialize(); 4103}; 4104 4105CommonForm.prototype.tryRestoreCSRFToken = function(xhr) 4106{ 4107 var list = xhr.getAllResponseHeaders().split(/\n/); 4108 var tokenHeader = _.find(list, function(headerValue){ 4109 return headerValue.search(/update-csrf: (.*)/i) !== -1; 4110 }); 4111 4112 var newTokenMatches = tokenHeader 4113 ? tokenHeader.match(/update-csrf: (.*)/i) 4114 : null; 4115 4116 if (newTokenMatches && newTokenMatches[1]) { 4117 var newTokenValue = JSON.parse(newTokenMatches[1]); 4118 4119 if (newTokenValue.value) { 4120 this.replaceCSRFToken(newTokenValue.value); 4121 } 4122 } 4123}; 4124// Submit form in force mode 4125CommonForm.prototype.submitForce = function() 4126{ 4127 this.skipCurrentBgSubmit(); 4128 4129 var oldValue = this.submitOnlyChanged; 4130 this.submitOnlyChanged = false; 4131 4132 this.$form.submit(); 4133 4134 this.submitOnlyChanged = oldValue; 4135}; 4136 4137// Prepare form before background submit 4138CommonForm.prototype.preprocessBackgroundSubmit = function() 4139{ 4140 this.form.isBgSubmitting = true; 4141 4142 this.triggerVent('submit.preprocess', this); 4143 4144 this.getElements().commonController('preprocessBackgroundSubmit'); 4145}; 4146 4147// Prepare form after background submit 4148CommonForm.prototype.postprocessBackgroundSubmit = function() 4149{ 4150 this.form.isBgSubmitting = false; 4151 if (this.form.currentSubmitXHR) { 4152 delete this.form.currentSubmitXHR; 4153 } 4154 4155 this.getElements().commonController('postprocessBackgroundSubmit'); 4156}; 4157 4158CommonForm.prototype.isSaveValue = function (element) { 4159 return true; 4160}; 4161 4162// Skip current background submit 4163CommonForm.prototype.skipCurrentBgSubmit = function () { 4164 if (this.form.isBgSubmitting) { 4165 this.form.isBgSubmitting = false; 4166 4167 if (this.form.currentSubmitXHR) { 4168 this.form.currentSubmitXHR.abort(); 4169 delete this.form.currentSubmitXHR; 4170 } 4171 4172 this.getElements().commonController('skipCurrentBgSubmit'); 4173 } 4174}; 4175 4176// Form has any changed state watcher's elements 4177CommonForm.prototype.hasChangedWatcher = function () { 4178 return this.getElements().filter(function() { 4179 return this.isChangedWatcher(); 4180 }).length > 0; 4181}; 4182 4183// Check - form changed or not 4184CommonForm.prototype.isChanged = function(onlyVisible) 4185{ 4186 return this.getElements().filter( 4187 function() { 4188 return this.commonController ? this.commonController.isChanged(onlyVisible) : false; 4189 } 4190 ).length > 0; 4191}; 4192 4193// Check - form was filled or not 4194CommonForm.prototype.wasFilledOnce = function() 4195{ 4196 var fields = this.getElements().filter( 4197 function() { 4198 return this.commonController ? this.commonController.isRequired() : false; 4199 } 4200 ); 4201 4202 return _.every(fields, function(item) { 4203 return item.commonController.wasFilledOnce() || !item.commonController.isVisible(); 4204 }); 4205}; 4206 4207CommonForm.prototype.handleElementBlur = function(elm) 4208{ 4209 this.elementBlurTO = setTimeout( 4210 _.bind(this.triggerBlur, this), 4211 this.blurTTL 4212 ); 4213}; 4214 4215CommonForm.prototype.handleElementFocus = function(elm) 4216{ 4217 if (this.elementBlurTO) { 4218 clearTimeout(this.elementBlurTO); 4219 this.elementBlurTO = null; 4220 } 4221 4222 if (!this.isFocus) { 4223 this.isFocus = true; 4224 this.triggerVent('focus', this); 4225 } 4226}; 4227 4228CommonForm.prototype.triggerBlur = function() 4229{ 4230 if (this.isFocus) { 4231 this.isFocus = false; 4232 this.triggerVent('blur', this); 4233 } 4234}; 4235 4236CommonForm.prototype.checkDependencyState = function() 4237{ 4238 var state = {}; 4239 4240 var checkState = _.bind(function (state, field, deps, show) { 4241 var depField, depValue, value; 4242 var input, element; 4243 for (depField in deps) if (deps.hasOwnProperty(depField)) { 4244 input = jQuery('[name="' + depField + '"]', jQuery(this.form)).not('[type="hidden"]').get(0); 4245 if (!input || !input.commonController) { 4246 continue; 4247 } 4248 depValue = deps[depField]; 4249 element = input.commonController.$element; 4250 4251 if (element.is('[type="checkbox"]')) { 4252 value = element.is(':checked') ? true : false;
4253 } else { 4254 value = element.val(); 4255 } 4256 4257 if (show) { 4258 if (depValue == value || ((typeof depValue === 'object') && _.contains(depValue, value))) { 4259 if (state[field] !== false) { 4260 state[field] = true; 4261 } 4262 } else { 4263 state[field] = false; 4264 } 4265 } else { 4266 if (depValue == value || ((typeof depValue === 'object') && _.contains(depValue, value))) { 4267 if (state[field] !== true) { 4268 state[field] = false; 4269 } 4270 } else { 4271 state[field] = true; 4272 } 4273 } 4274 } 4275 4276 return state; 4277 }, this); 4278 4279 _.each( 4280 this.getDependency(), 4281 function(value, field) { 4282 state = checkState(state, field, value.hide, false); 4283 state = checkState(state, field, value.show, true); 4284 } 4285 ); 4286 4287 return state; 4288}; 4289 4290CommonForm.prototype.getDependency = function() 4291{ 4292 var dependency = {}; 4293 4294 this.$form.find('.has-dependency :input, .separator.has-dependency h2').each( 4295 function () { 4296 if (typeof(this.commonController) !== 'undefined') { 4297 if (typeof(this.commonController.hasDependency) !== 'undefined' && this.commonController.hasDependency()) { 4298 var name = this.commonController.element.name || this.commonController.$element.data('name'); 4299 dependency[name] = this.commonController.getDependency(); 4300 } 4301 } 4302 } 4303 ); 4304 4305 return dependency; 4306}; 4307 4308CommonForm.prototype.setDependencyState = function(state) 4309{ 4310 _.each( 4311 state, 4312 this.setElementDependency, 4313 this 4314 ); 4315}; 4316 4317CommonForm.prototype.setElementDependency = function (state, field) 4318{ 4319 var element = jQuery(this.form.elements.namedItem(field)).add('[data-name="' + field + '"]', this.form).filter('[type!="hidden"]').get(0); 4320 if (element) { 4321 var elementController = element.commonController; 4322 4323 if (state) { 4324 elementController.showByDependency(); 4325 4326 } else { 4327 elementController.hideByDependency(); 4328 } 4329 } 4330}; 4331 4332// {{{ Form readiness 4333 4334CommonForm.prototype.controlReadiness = false; 4335 4336CommonForm.prototype.isReady = null; 4337 4338CommonForm.prototype.switchControlReadiness = function(flag) 4339{ 4340 this.controlReadiness = flag === true || typeof(flag) === 'undefined'; 4341 4342 if (this.controlReadiness) { 4343 this.processReadiness(); 4344 } 4345 4346 return this; 4347}; 4348 4349CommonForm.prototype.resetReadiness = function() 4350{ 4351 this.isReady = null; 4352 4353 return this; 4354}; 4355 4356CommonForm.prototype.processReadiness = function() 4357{ 4358 if (this.isReadinessChanged()) { 4359 if (this.isReady) { 4360 this.triggerVent('ready', this); 4361 4362 } else { 4363 this.triggerVent('unready', this); 4364 } 4365 } 4366}; 4367 4368CommonForm.prototype.isReadinessChanged = function() 4369{ 4370 var tmp = this.isReady; 4371 this.isReady = this.validate(true); 4372 4373 return tmp != this.isReady; 4374}; 4375 4376CommonForm.prototype.findParentCellForElementOnStickyPanel = function(element) { 4377 let result = element; 4378 while (result && result.parentNode && result.classList && !result.classList.contains('panel-cell')) { 4379 result = result.parentNode; 4380 } 4381 if (result && result.classList && result.classList.contains('panel-cell')) { 4382 return result; 4383 } 4384 return element; 4385}; 4386 4387// }}} 4388 4389/** 4390 * Element 4391 */ 4392 4393// Constructor 4394function CommonElement(elm) 4395{ 4396 this.validationCallbacks = []; 4397 4398 if (elm && !elm.commonController) { 4399 this.bindElement(elm); 4400 } 4401} 4402 4403extend(CommonElement, Base); 4404 4405CommonElement.prototype.element = null; 4406CommonElement.prototype.$element = null; 4407// Validattion class-base rule pattern 4408CommonElement.prototype.classRegExp = /^field-(.+)$/; 4409CommonElement.prototype.watchTTL = 2000; 4410CommonElement.prototype.promptPosition = 'bottomLeft'; 4411 4412// Bind element 4413CommonElement.prototype.bindElement = function(elm) 4414{ 4415 this.element = elm; 4416 this.$element = jQuery(elm); 4417 4418 this.element.commonController = this; 4419 4420 // Add methods and properties 4421 var methods = [ 4422 'showInlineError', 'hideInlineError', 'markAsInvalid', 4423 'unmarkAsInvalid', 'markAsProgress', 'unmarkAsProgress', 4424 'validate', 'isChanged', 'markAsWatcher', 4425 'toggleActivity', 'isEnabled', 'enable', 4426 'disable', 'isVisible', 4427 'showInlineMessage', 'hideInlineMessage' 4428 ]; 4429 4430 _.each( 4431 methods, 4432 function(method) { 4433 this.element[method] = _.bind( 4434 function() { 4435 return this[method].apply(this, arguments); 4436 }, 4437 this 4438 ); 4439 }, 4440 this 4441 ); 4442 4443 this.saveValue(); 4444 this.element.isInitialError = this.$element.hasClass('validation-error'); 4445 4446 this.assignHandlers(); 4447 4448 this.$element.bind('jqv.field.result', _.bind(this.handleValidationEngineResult, this)); 4449 var debounced = _.debounce(_.bind(this.handleKeyUp, this), 100); 4450 var debouncedChange = _.debounce(_.bind(this.handleChange, this), 100); 4451 this.$element 4452 .change(debouncedChange) 4453 .keyup(debounced) 4454 .bind('paste', debounced); 4455 4456 if (this.$element.parents('.instant-control-readiness').length > 0) { 4457 this.$element.keyup(_.debounce(_.bind(this.handleKeyUpControlReadiness, this), 100)); 4458 } 4459 4460 this.triggerVent('bind'); 4461}; 4462 4463CommonElement.prototype.getForm = function () { 4464 return (this.element.form && this.element.form.commonController) 4465 ? this.element.form.commonController 4466 : null; 4467}; 4468 4469// Get validators by form element 4470CommonElement.prototype.getValidators = function () {
4471 var validators = []; 4472 4473 if (this.element.className) { 4474 var classes = this.element.className.split(/ /); 4475 var m, methodName; 4476 for (var i = 0; i < classes.length; i++) { 4477 4478 m = classes[i].match(this.classRegExp); 4479 4480 if (m && m[1]) { 4481 methodName = m[1].replace(/-[a-z]/, this.buildMethodName); 4482 methodName = 'validate' + methodName.substr(0, 1).toUpperCase() + methodName.substr(1); 4483 if (typeof(this[methodName]) !== 'undefined') { 4484 validators.push( 4485 { 4486 key: m[1], 4487 method: this[methodName] 4488 } 4489 ); 4490 } 4491 } 4492 } 4493 } 4494 4495 return validators; 4496}; 4497 4498// Get element label by form element 4499CommonElement.prototype.getLabel = function() 4500{ 4501 var label = null; 4502 4503 if (this.element.id) { 4504 var lbl = jQuery('label[for="' + this.element.id + '"]'); 4505 if (lbl.length) { 4506 label = jQuery.trim(lbl.eq(0).html()).replace(/:$/, '').replace(/<.+$/, ''); 4507 } 4508 } 4509 4510 return label; 4511}; 4512 4513// Check - element visible or not 4514CommonElement.prototype.isVisible = function() 4515{ 4516 if (this.$element.css('display') == 'none') { 4517 return false; 4518 } 4519 4520 return this.$element 4521 .parents() 4522 .filter( 4523 function() { 4524 return $(this).css('display') == 'none'; 4525 } 4526 ) 4527 .length == 0; 4528}; 4529 4530CommonElement.prototype.isVisibleForValidation = function() 4531{ 4532 var data = this.$element.data('jqv'); 4533 4534 return this.isVisible() || (data && data.validateNonVisibleFields === true) 4535 || this.$element.data('custom-validate') === true; 4536}; 4537 4538// Build validator method name helper 4539CommonElement.prototype.buildMethodName = function(str) 4540{ 4541 return str.substr(1).toUpperCase(); 4542}; 4543 4544// Validate form element 4545CommonElement.prototype.addValidationCallback = function(callback) 4546{ 4547 this.validationCallbacks.push(callback); 4548}; 4549 4550// Validate form element 4551CommonElement.prototype.getValidationCallbacks = function() 4552{ 4553 return this.validationCallbacks; 4554}; 4555 4556// Validate form element 4557CommonElement.prototype.validate = function(silent, noFocus) 4558{ 4559 var result = true; 4560 4561 if (!this.isVisibleForValidation()) { 4562 return result; 4563 } 4564 4565 if ( 4566 this.$element.is(':input') 4567 && ( 4568 (typeof(this.element.type) !== 'undefined' && this.element.type == 'hidden') 4569 || this.$element.closest('.hidden').length > 0 4570 ) 4571 ) { 4572 // Hidden input always validate successfull 4573 result = true; 4574 4575 } else if (this.$element.hasClass('no-validate')) { 4576 4577 // Hidden element always validate successfull 4578 result = true; 4579 4580 } else if (this.$element.hasClass('server-validation-error') && !this.isChanged() && !this.wasFilledOnce()) { 4581 4582 // Element is fail server validation and element's value did not changed 4583 result = false;
4584 4585 } else { 4586 4587 this.$element.data('validation-silent', !!silent); 4588 4589 var validators = this.getValidators(); 4590 4591 if (validators.length > 0 && this.isVisibleForValidation()) { 4592 4593 // Check by validators 4594 for (var i = 0; i < validators.length && result; i++) { 4595 4596 var res = validators[i].method.call(this); 4597 if (!res.status && res.apply) { 4598 result = false; 4599 4600 if (!silent) { 4601 res.message = xcart.t(res.message); 4602 this.markAsInvalid(res.message, validators[i].key); 4603 } 4604 } 4605 } 4606 4607 if (result && !silent && this.$element.hasClass('validation-error')) { 4608 this.unmarkAsInvalid(); 4609 } 4610 } 4611 4612 // Validation using validationEngine plugin 4613 if (result && this.$element.validationEngine && this.$element.attr('id')) { 4614 this.$element.validationEngine('validate'); 4615 result = !this.$element.data('validation-error'); 4616 } 4617 4618 var state = {'widget': this, 'result': result, 'silent': silent}; 4619 this.triggerVent('validate', state); 4620 4621 result = state.result; 4622 4623 if (result && silent) { 4624 this.unmarkAsInvalid(); 4625 } 4626 4627 if (result && !_.isEmpty(this.element.value) && this.$element.hasClass('show-valid-state')) { 4628 this.markAsValid(); 4629 } 4630 } 4631 4632 var element = this.$element; 4633 4634 return result && _.every(this.getValidationCallbacks(), function(callback) { 4635 return callback(element); 4636 }); 4637}; 4638 4639// Check 4640CommonElement.prototype.isUseInlineError = function() 4641{ 4642 return jQuery(this.element.form).hasClass('use-inline-error'); 4643}; 4644 4645// Check 4646CommonElement.prototype.isUsePromptError = function() 4647{ 4648 return jQuery(this.element.form).hasClass('use-prompt-error') 4649 && typeof(this.$element.validationEngine) !== 'undefined'; 4650}; 4651 4652// Mark element as invalid (validation is NOT passed) 4653CommonElement.prototype.markAsInvalid = function(message, key, serverSideError) 4654{ 4655 key = key || this.element.name; 4656 4657 var oldErrorMessage = this.$element.data('lastValidationError'); 4658 var common_container = this.$element.closest(".table-value").parent(); 4659 4660 this.$element 4661 .addClass('validation-error') 4662 .data('lastValidationError', message) 4663 .data('lastValidationKey', key); 4664 4665 this.$element.parent().addClass('has-error'); 4666 common_container.addClass('has-error'); 4667 this.$element.parent().removeClass('has-success has-success-mark'); 4668 4669 if (this.isUseInlineError()) { 4670 this.$element 4671 .not('.forbid-inline-error') 4672 .each( 4673 function() { 4674 this.hideInlineError(); 4675 this.hideInlineMessage(); 4676 this.showInlineError(message); 4677 } 4678 ); 4679 4680 } else if (this.isUsePromptError()) { 4681 this.$element.validationEngine( 4682 'showPrompt', 4683 message, 4684 null, 4685 this.promptPosition, 4686 true 4687 ); 4688 4689 } else { 4690 if (this.$element.attr('title')) { 4691 this.element.oldTitle = this.$element.attr('title'); 4692 this.$element.removeAttr('title'); 4693 } 4694 if (typeof(this.element.errorTooltipAssigned) === 'undefined' || !this.element.errorTooltipAssigned) { 4695 this.$element.tooltip({ 4696 title: message, 4697 placement: 'bottom', 4698 trigger: 'focus' 4699 }); 4700 this.element.errorTooltipAssigned = true; 4701 this.$element.tooltip('show'); 4702 4703 } else if (message !== oldErrorMessage) { 4704 this.$element.tooltip('hide').attr('data-original-title', message).tooltip('show'); 4705 } 4706 } 4707 4708 if (serverSideError) { 4709 this.$element.addClass('server-validation-error'); 4710 } 4711 4712 this.$element.trigger('invalid'); 4713 this.triggerVent('markAsInvalid', this); 4714}; 4715 4716// Unmark element as invalid (validation is passed) 4717CommonElement.prototype.unmarkAsInvalid = function() 4718{ 4719 var common_container = this.$element.parents(".table-value").parent(); 4720 4721 if (this.$element.hasClass('validation-error')) { 4722 this.$element.trigger('valid'); 4723 } 4724 4725 this.$element 4726 .data('lastValidationError', null) 4727 .data('lastValidationKey', null) 4728 .removeClass('validation-error') 4729 .removeClass('server-validation-error') 4730 .each(function() { 4731 this.hideInlineError(); 4732 }); 4733 4734 this.$element.parent().removeClass('has-error'); 4735 common_container.removeClass('has-error'); 4736 if (typeof(this.element.errorTooltipAssigned) !== 'undefined' && this.element.errorTooltipAssigned) { 4737 this.$element.tooltip('destroy'); 4738 this.element.errorTooltipAssigned = false;
4739 } 4740 if (typeof(this.element.oldTitle) !== 'undefined' && this.element.oldTitle) { 4741 this.$element.attr('title', this.element.oldTitle); 4742 this.element.oldTitle = null; 4743 } 4744 4745 this.triggerVent('unmarkAsInvalid', this); 4746}; 4747 4748// Mark element as valid (validation is passed) 4749CommonElement.prototype.markAsValid = function(message) 4750{ 4751 this.unmarkAsInvalid(); 4752 4753 this.$element 4754 .data('lastValidationMessage', message) 4755 .each( 4756 function() { 4757 this.hideInlineMessage(); 4758 this.showInlineMessage(message); 4759 } 4760 ); 4761 4762 this.$element.parent().addClass('has-success'); 4763 if (isElement(this.element, 'input') && jQuery.inArray(this.element.type, ['checkbox', 'radio']) == -1) { 4764 this.$element.parent().addClass('has-success-mark'); 4765 } 4766 4767 this.triggerVent('markAsValid', this); 4768}; 4769 4770// Show element inline error message 4771CommonElement.prototype.showInlineError = function(message) 4772{ 4773 var elm = jQuery(document.createElement('p')) 4774 .addClass('error') 4775 .addClass('inline-error') 4776 .html(message); 4777 var placed = false; 4778 4779 this.triggerVent('placeError', {'widget': this, 'element': elm, 'placed': placed}); 4780 if (!placed) { 4781 if (this.$element.is(':checkbox') && this.$element.nextAll('label').length) { 4782 elm.insertAfter(this.$element.nextAll('label').eq(0)); 4783 4784 } else { 4785 elm.insertAfter(this.$element); 4786 } 4787 } 4788}; 4789 4790// Hide element inline error message 4791CommonElement.prototype.hideInlineError = function() 4792{ 4793 return jQuery('p.inline-error', this.element.parentNode).remove(); 4794}; 4795 4796// Show element inline error message 4797CommonElement.prototype.showInlineMessage = function(message) 4798{ 4799 var elm = jQuery(document.createElement('p')) 4800 .addClass('message') 4801 .addClass('inline-message') 4802 .html(message); 4803 var placed = false; 4804 4805 this.triggerVent('placeMessage', {'widget': this, 'element': elm, 'placed': placed}); 4806 if (!placed) { 4807 if (this.$element.is(':checkbox') && this.$element.nextAll('label').length) { 4808 elm.insertAfter(this.$element.nextAll('label').eq(0)); 4809 4810 } else { 4811 elm.insertAfter(this.$element); 4812 } 4813 } 4814}; 4815 4816// Hide element inline error message 4817CommonElement.prototype.hideInlineMessage = function() 4818{ 4819 return jQuery('p.inline-message', this.element.parentNode).remove(); 4820}; 4821 4822// Mark element as in-progress element 4823CommonElement.prototype.markAsProgress = function() 4824{ 4825 this.$element.addClass('progress-mark-apply'); 4826 this.$element.parent().removeClass('has-success has-success-mark'); 4827 4828 return jQuery('<div></div>') 4829 .insertAfter(this.$element) 4830 .addClass('single-progress-mark'); 4831}; 4832 4833// Unmark element as in-progress element 4834CommonElement.prototype.unmarkAsProgress = function() 4835{ 4836 this.$element.removeClass('progress-mark-apply'); 4837 4838 return jQuery('.single-progress-mark', this.element.parentNode).remove(); 4839}; 4840 4841// Mark element as change watcher 4842CommonElement.prototype.markAsWatcher = function(beforeCallback) 4843{ 4844 var o = this; 4845 4846 this.element.selfSubmitting = false; 4847 this.element.selfSubmitTO = null; 4848 this.element.lastValue = this.element.value; 4849 4850 var submitElement = function(event) { 4851 if (o.element.selfSubmitTO) { 4852 clearTimeout(o.element.selfSubmitTO); 4853 o.element.selfSubmitTO = null; 4854 } 4855 4856 if ( 4857 (o.isChanged() || (o.$element.hasClass('validation-error') && !o.$element.hasClass('server-validation-error'))) 4858 && (!beforeCallback || beforeCallback(o.element)) 4859 ) { 4860 jQuery(o.element.form).submit(); 4861 } 4862 }; 4863 4864 var delayedUpdate = function(event) { 4865 if (this.lastValue !== this.value) { 4866 4867 this.lastValue = this.value; 4868 4869 if (this.selfSubmitTO) { 4870 clearTimeout(this.selfSubmitTO); 4871 this.selfSubmitTO = null; 4872 } 4873 4874 this.selfSubmitTO = setTimeout(submitElement, o.watchTTL); 4875 } 4876 }; 4877 4878 o.$element 4879 .blur(submitElement) 4880 .keyup(delayedUpdate) 4881 .filter('[type="checkbox"]') 4882 .click(submitElement); 4883 4884 if (typeof(jQuery.fn.mousewheel) !== 'undefined') { 4885 o.$element.mousewheel(delayedUpdate); 4886 } 4887}; 4888 4889// Element is column checkboxes switcher 4890CommonElement.prototype.markAsColumnSwitcher = function() 4891{ 4892 this.$element.click( 4893 function() { 4894 var idx = jQuery(this).parents('th').get(0).cellIndex; 4895 var newState = this.checked; 4896 4897 jQuery(this).parents('table').find('tr').each( 4898 function() { 4899 jQuery(this.cells[idx]).find(':checkbox').get(0).checked = newState; 4900 } 4901 ); 4902 } 4903 ); 4904}; 4905 4906// Element is mouse wheel controlled 4907CommonElement.prototype.markAsWheelControlled = function() 4908{ 4909 var o = this; 4910 4911 this.$element.mousewheel( 4912 function(event, delta) { 4913 4914 // Pull min and max value from the validationEndine class 4915 if (o.$element.attr('class').match(/min\[(\d+)\].*max\[(\d+)\]/)) { 4916 o.$element.mousewheel.options = { 4917 'min': RegExp.$1, 4918 'max': RegExp.$2 4919 }; 4920 } 4921 4922 return o.$element.hasClass('focused') && o.updateByMouseWheel(event, delta); 4923 } 4924 ); 4925 4926 if (!this.$element.hasClass('no-wheel-mark') && this.$element.nextAll('.wheel-mark').length == 0) { 4927 jQuery(document.createElement('span')) 4928 .addClass('wheel-mark') 4929 .html(' ') 4930 .insertAfter(this.$element); 4931 } 4932 4933 this.$element.addClass('wheel-mark-input'); 4934 4935 this.$element.focus( 4936 function() { 4937 jQuery(this).addClass('focused'); 4938 } 4939 ); 4940 4941 this.$element.blur( 4942 function() { 4943 jQuery(this).removeClass('focused'); 4944 } 4945 ); 4946}; 4947 4948// Update element by mouse wheel 4949CommonElement.prototype.updateByMouseWheel = function(event, delta) 4950{ 4951 event.stopPropagation(); 4952 4953 var value = false;
4954 var mantis = 0; 4955 4956 if (this.element.value.length == 0) { 4957 value = 0; 4958 4959 } else if (this.element.value.search(/^ *[+-]?[0-9]+\.?[0-9]* *$/) != -1) { 4960 var m = this.element.value.match(/^ *[+-]?[0-9]+\.([0-9]+) *$/); 4961 if (m && m[1]) { 4962 mantis = m[1].length; 4963 } 4964 4965 value = parseFloat(this.element.value); 4966 if (isNaN(value)) { 4967 value = false; 4968 } 4969 } 4970 4971 if (value !== false) { 4972 4973 value = value + delta; 4974 4975 if ( 4976 typeof(jQuery(this).mousewheel) !== 'undefined' 4977 && typeof(jQuery(this).mousewheel.options) !== 'undefined' 4978 ) { 4979 4980 var mwBase = jQuery(this).mousewheel.options, 4981 min = parseFloat(mwBase.min), 4982 max = parseFloat(mwBase.max); 4983 4984 if (typeof(mwBase.min) !== 'undefined' && min > value) { 4985 value = min; 4986 } else if (typeof(mwBase.max) !== 'undefined' && max < value) { 4987 value = max; 4988 } 4989 } 4990 4991 value = mantis 4992 ? Math.round(value * Math.pow(10, mantis)) / Math.pow(10, mantis) 4993 : Math.round(value); 4994 4995 var oldValue = this.element.value; 4996 this.element.value = value; 4997 4998 if (jQuery(this.element).validationEngine('validate')) { 4999 this.element.value = oldValue; 5000 5001 } else { 5002 this.$element.change(); 5003 jQuery(this.element.form).change(); 5004 5005 } 5006 5007 this.$element.removeClass('wrong-amount'); 5008 } 5009 5010 return false; 5011}; 5012 5013// Undo changes 5014CommonElement.prototype.undo = function() 5015{ 5016 if (this.isChanged(true)) { 5017 if (isElement(this.element, 'input') && jQuery.inArray(this.element.type, ['checkbox', 'radio']) !== -1) { 5018 this.element.checked = this.element.initialValue; 5019 5020 } else { 5021 this.element.value = this.element.initialValue; 5022 } 5023 this.$element.change(); 5024 5025 this.$element.trigger('undo'); 5026 } 5027}; 5028 5029// Element is state watcher 5030CommonElement.prototype.isWatcher = function() 5031{ 5032 return typeof(this.element.selfSubmitting) !== 'undefined'; 5033}; 5034 5035// Element is changed state watcher 5036CommonElement.prototype.isChangedWatcher = function() 5037{ 5038 return this.isWatcher() && this.element.selfSubmitTO; 5039}; 5040 5041// Check - element changed or not 5042CommonElement.prototype.isChanged = function(onlyVisible) 5043{ 5044 var result = false;
5045 5046 if ((!(onlyVisible && !this.isVisible()) && this.isSignificantInput()) || this.isAffectChange()) { 5047 if ( 5048 (isElement(this.element, 'input') && jQuery.inArray(this.element.type, ['text', 'number', 'password', 'hidden', 'file']) !== -1) 5049 || isElement(this.element, 'select') 5050 || isElement(this.element, 'textarea') 5051 ) { 5052 if (isElement(this.element, 'select') && this.$element.prop('multiple')) { 5053 result = !this.isEqualArrayValues(this.element.initialValue, this.$element.val(), this.$element); 5054 5055 } else { 5056 result = !this.isEqualValues(this.element.initialValue, this.element.value, this.$element); 5057 } 5058 5059 } else if (isElement(this.element, 'input') && jQuery.inArray(this.element.type, ['checkbox', 'radio']) !== -1) { 5060 result = !this.isEqualValues(this.element.initialValue, !!this.element.checked, this.$element); 5061 } 5062 } 5063 5064 return result; 5065}; 5066 5067// Check - element was filled once or not 5068CommonElement.prototype.wasFilledOnce = function () 5069{ 5070 if (!this.wasFilled) { 5071 if (isElement(this.element, 'input') && jQuery.inArray(this.element.type, ['text', 'password', 'hidden', 'file']) !== -1) { 5072 this.wasFilled = !_.isEmpty(this.element.value) || this.isChanged(true); 5073 } else { 5074 this.wasFilled = true; 5075 } 5076 } 5077 5078 return this.wasFilled; 5079}; 5080 5081// Check - element is significant or not 5082CommonElement.prototype.isSignificantInput = function () 5083{ 5084 return !this.$element.hasClass('not-significant'); 5085}; 5086 5087CommonElement.prototype.isAffectChange = function () 5088{ 5089 return this.$element.hasClass('affect-change'); 5090}; 5091 5092CommonElement.prototype.isRequired = function () 5093{ 5094 return this.element.className.indexOf('required') != -1; 5095}; 5096 5097// Check element old value and new valies - equal or not 5098CommonElement.prototype.isEqualValues = function(oldValue, newValue) 5099{ 5100 return oldValue == newValue; 5101}; 5102 5103// Check array values and return true if they are equal 5104CommonElement.prototype.isEqualArrayValues = function(oldValue, newValue, element) 5105{ 5106 var result = false;
5107 5108 if (oldValue == null) { 5109 result = (oldValue == newValue); 5110 5111 } else if (newValue != null && oldValue.length == newValue.length) { 5112 5113 result = true; 5114 5115 for (var i = 0; i < oldValue.length; i++) { 5116 if (oldValue[i] != newValue[i]) { 5117 result = false; 5118 break; 5119 } 5120 } 5121 } 5122 5123 return result; 5124}; 5125 5126// Save element value as initial value 5127CommonElement.prototype.saveValue = function() 5128{ 5129 var customInitValue = this.$element.data('init-value'); 5130 this.element.initialValue = customInitValue ? customInitValue : this.getCanonicalValue(); 5131}; 5132 5133// Get canonical element value 5134CommonElement.prototype.getCanonicalValue = function() 5135{ 5136 var result = null; 5137 5138 if ( 5139 (isElement(this.element, 'input') && jQuery.inArray(this.element.type, ['text', 'number', 'password', 'hidden', 'file']) != -1) 5140 || isElement(this.element, 'select') 5141 || isElement(this.element, 'textarea') 5142 ) { 5143 if (isElement(this.element, 'select') && this.$element.prop('multiple')) { 5144 result = this.$element.val(); 5145 5146 } else { 5147 result = this.element.value; 5148 } 5149 5150 } else if (isElement(this.element, 'input') && jQuery.inArray(this.element.type, ['checkbox', 'radio']) != -1) { 5151 result = this.element.checked; 5152 } 5153 5154 return result; 5155}; 5156 5157// Prepare element before background submit 5158CommonElement.prototype.preprocessBackgroundSubmit = function() 5159{ 5160 if (this.$element.hasClass('progress-mark-owner') && this.isVisible() && this.isChanged()) { 5161 this.markAsProgress(); 5162 } 5163 5164 if (!this.$element.prop('readonly')) { 5165 if (isElement(this.element, 'select')) { 5166 this.$element.addClass('readonly-mark'); 5167 } 5168 this.$element.prop('readonly', 'readonly'); 5169 this.element.isTemporaryReadonly = true; 5170 } 5171}; 5172 5173// Prepare element after background submit 5174CommonElement.prototype.postprocessBackgroundSubmit = function() 5175{ 5176 if (this.getForm() && this.getForm().isSaveValue(this)) { 5177 this.saveValue(); 5178 } 5179 5180 if (this.$element.hasClass('progress-mark-apply')) { 5181 this.unmarkAsProgress(); 5182 } 5183 5184 if (this.element.isTemporaryReadonly) { 5185 if (isElement(this.element, 'select')) { 5186 this.$element.removeClass('readonly-mark'); 5187 } 5188 this.$element.prop('readonly', false); 5189 this.element.isTemporaryReadonly = null; 5190 } 5191}; 5192 5193// 'Skip current background submit' form event 5194CommonElement.prototype.skipCurrentBgSubmit = function() 5195{ 5196 this.postprocessBackgroundSubmit(); 5197}; 5198 5199CommonElement.prototype.linkWithCountry = function() 5200{ 5201 var countryName = this.element.name.replace(/state/, 'country'); 5202 var country = this.element.form.elements.namedItem(countryName); 5203 5204 if (country && typeof(window.CountriesStates) !== 'undefined') { 5205
5206 this.element.isFocused = false; 5207 5208 jQuery(this.$element) 5209 .focus(function() { 5210 this.isFocused = true; 5211 }) 5212 .blur(function() { 5213 this.isFocused = false; 5214 }); 5215 5216 var stateSwitcher = document.createElement('input'); 5217 stateSwitcher.type = 'hidden'; 5218 stateSwitcher.name = this.element.name.replace(/state/, 'is_custom_state'); 5219 stateSwitcher.value = isElement(this.element, 'input') ? '1' : ''; 5220 country.form.appendChild(stateSwitcher); 5221 new CommonElement(stateSwitcher); 5222 5223 this.element.currentCountryCode = false; 5224 country.stateInput = this.element; 5225 5226 var o = this; 5227 5228 o.lastStateText = ''; 5229 5230 var replaceElement = function(type) 5231 { 5232 var inp = document.createElement(type); 5233 if (type == 'input') { 5234 inp.type = 'text'; 5235 } 5236 inp.id = this.stateInput.id; 5237 inp.className = this.stateInput.className; 5238 inp.name = this.stateInput.name; 5239 inp.currentCountryCode = this.stateInput.currentCountryCode; 5240 5241 var isFocused = this.stateInput.isFocused; 5242 5243 jQuery(this.stateInput).replaceWith(inp); 5244 this.stateInput = inp; 5245 5246 if (isFocused) { 5247 this.stateInput.focus(); 5248 } 5249 5250 jQuery(this.stateInput) 5251 .focus(function() { 5252 this.isFocused = true; 5253 }) 5254 .blur(function() { 5255 this.isFocused = false; 5256 }); 5257 5258 o.bind(inp); 5259 }; 5260 5261 var change = function() 5262 { 5263 if (this.stateInput.currentCountryCode == this.value) { 5264 return true; 5265 } 5266 5267 this.stateInput.currentCountryCode = this.value; 5268 5269 if (typeof(CountriesStates[this.value]) === 'undefined') { 5270 5271 // As input box 5272 if (!isElement(this.stateInput, 'input')) { 5273 replaceElement.call(this, 'input'); 5274 this.stateInput.value = o.lastStateText; 5275 } 5276 5277 stateSwitcher.value = '1'; 5278 5279 } else { 5280 5281 // As select box 5282 var previousSelected = null; 5283 if (isElement(this.stateInput, 'select')) { 5284 5285 if (this.stateInput.options.length > 0 && this.stateInput.options[this.stateInput.selectedIndex].value !== '' ) { 5286 previousSelected = this.stateInput.options[this.stateInput.selectedIndex].value; 5287 jQuery('option', this.stateInput).remove(); 5288 } 5289 5290 } else { 5291 o.lastStateText = this.stateInput.value; 5292 replaceElement.call(this, 'select'); 5293 } 5294 5295 for (var i = 0; i < CountriesStates[this.value].length; i++) { 5296 var s = CountriesStates[this.value][i]; 5297 this.stateInput.options[i] = new Option(s.state, s.state_code); 5298 5299 if (previousSelected && previousSelected == s.state_code) { 5300 this.stateInput.options[i].selected = true; 5301 this.stateInput.selectedIndex = i; 5302 } 5303 } 5304 5305 stateSwitcher.value = ''; 5306 } 5307 }; 5308 5309 jQuery(country).change(change); 5310 5311 change.call(country); 5312 } 5313}; 5314 5315// Prepare element with onclick-based location change 5316CommonElement.prototype.processLocation = function() 5317{ 5318 if ( 5319 this.$element.attr('onclick') 5320 && this.$element.attr('onclick').toString().search(/\.location[ ]*=[ ]*['"].+['"]/) !== -1 5321 ) { 5322 var m = this.$element.attr('onclick').toString().match(/\.location[ ]*=[ ]*['"](.+)['"]/); 5323 this.$element 5324 .data('location', m[1]) 5325 .removeAttr('onclick'); 5326 } 5327}; 5328 5329// Toggle element activity 5330CommonElement.prototype.toggleActivity = function(condition) 5331{ 5332 if ( 5333 (typeof(condition) !== 'undefined' && condition) 5334 || (typeof(condition) === 'undefined' && !this.isEnabled()) 5335 ) { 5336 this.enable(); 5337 5338 } else { 5339 this.disable(); 5340 } 5341}; 5342 5343// Check element activity 5344CommonElement.prototype.isEnabled = function() 5345{ 5346 return !this.$element.hasClass('disabled'); 5347}; 5348 5349// Disable element 5350CommonElement.prototype.disable = function() 5351{ 5352 var common_container = this.$element.parents(".table-value").parent(); 5353 5354 common_container.addClass('disabled'); 5355 this.$element 5356 .addClass('disabled') 5357 .prop('disabled', true); 5358}; 5359 5360// Enable element 5361CommonElement.prototype.enable = function() 5362{ 5363 var common_container = this.$element.parents(".table-value").parent(); 5364 5365 common_container.removeClass('disabled'); 5366 this.$element 5367 .removeClass('disabled') 5368 .prop('disabled', false); 5369}; 5370 5371CommonElement.prototype.handleChange = function(event) 5372{ 5373 var controlReadiness = this.element.form && this.element.form.commonController.controlReadiness; 5374 5375 if (controlReadiness 5376 || this.$element.hasClass('validation-error') 5377 || this.$element.hasClass('touched') 5378 ) { 5379 this.validate(); 5380 } 5381 5382 if (controlReadiness) { 5383 this.element.form.commonController.processReadiness(); 5384 } 5385 5386 this.$element.addClass('touched'); 5387}; 5388 5389CommonElement.prototype.handleKeyUp = function(event) 5390{ 5391 if (this.isSignificantInput()) { 5392 jQuery(this.element.form).change(); 5393 } 5394}; 5395 5396CommonElement.prototype.handleKeyUpControlReadiness = function(event) 5397{ 5398 var controlReadiness = this.element.form && this.element.form.commonController.controlReadiness; 5399 5400 if (controlReadiness) { 5401 this.element.form.commonController.processReadiness(); 5402 } 5403}; 5404 5405CommonElement.prototype.handleValidationEngineResult = function(event, field, errorFound, prompText) 5406{ 5407 if (errorFound) { 5408 jQuery('.formError').remove(); 5409 5410 if ( 5411 !field.data('validation-silent') 5412 || (field.get(0).isChanged() && field.get(0) !== document.activeElement) 5413 ) { 5414 field.get(0).commonController.markAsInvalid( 5415 prompText.replace(/^\* /g, '').replace(/<br.>.*$/g, '') 5416 ); 5417 } 5418 } else { 5419 field.get(0).commonController.unmarkAsInvalid(); 5420 } 5421 5422 field.data('validation-error', errorFound); 5423}; 5424 5425/** 5426 * Validators 5427 */ 5428 5429// E-mail 5430CommonElement.prototype.validateEmail = function() 5431{ 5432 var re = new RegExp( 5433 "^[a-z0-9!#$%&\'*+\\/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&\'*+\\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z](?:[a-z0-9-]*[a-z0-9])?\\s*$", 5434 'gi' 5435 ); 5436 5437 var apply = isElement(this.element, 'input') || isElement(this.element, 'textarea'); 5438 5439 return {
5440 status: !apply || !this.element.value.length || this.element.value.search(re) !== -1, 5441 message: 'Enter a correct email', 5442 apply: apply 5443 }; 5444}; 5445 5446// Integer 5447CommonElement.prototype.validateInteger = function() 5448{ 5449 var apply = isElement(this.element, 'input') || isElement(this.element, 'textarea'); 5450 5451 return { 5452 status: !apply || !this.element.value.length || this.element.value.search(/^ *[0-9]+ */) != -1, 5453 message: 'Enter an integer', 5454 apply: apply 5455 }; 5456}; 5457 5458// Float 5459CommonElement.prototype.validateFloat = function() 5460{ 5461 var apply = isElement(this.element, 'input') || isElement(this.element, 'textarea'); 5462 5463 var value = this.element.value.replace(/^ +/, '').replace(/ +$/, ''); 5464 var sanitized = parseFloat(value); 5465 5466 return { 5467 status: !apply || !this.element.value.length || (!isNaN(sanitized)), 5468 message: 'Enter a number', 5469 apply: apply 5470 }; 5471}; 5472 5473// Positive number 5474CommonElement.prototype.validatePositive = function() 5475{ 5476 var apply = isElement(this.element, 'input') || isElement(this.element, 'textarea'); 5477 5478 var value = parseFloat(this.element.value); 5479 5480 return { 5481 status: !apply || !this.element.value.length || (!isNaN(value) && value >= 0), 5482 message: 'Enter a positive number', 5483 apply: apply 5484 }; 5485}; 5486 5487// Negative number 5488CommonElement.prototype.validateNegative = function() 5489{ 5490 var apply = isElement(this.element, 'input') || isElement(this.element, 'textarea'); 5491 5492 var value = parseFloat(this.element.value); 5493 5494 return { 5495 status: !apply || !this.element.value.length || (!isNaN(value) && value <= 0), 5496 message: 'Enter a negative number', 5497 apply: apply 5498 }; 5499}; 5500 5501// Non-zero number 5502CommonElement.prototype.validateNonZero = function() 5503{ 5504 var apply = isElement(this.element, 'input') || isElement(this.element, 'textarea'); 5505 5506 var value = parseFloat(this.element.value); 5507 5508 return { 5509 status: !apply || !this.element.value.length || (!isNaN(value) && value != 0), 5510 message: 'Zero cannot be used', 5511 apply: apply 5512 }; 5513}; 5514 5515// Range (min - max) number 5516CommonElement.prototype.validateRange = function() 5517{ 5518 var apply = isElement(this.element, 'input') || isElement(this.element, 'textarea'); 5519 5520 var result = { 5521 status: true, 5522 message: 'This field is required', 5523 apply: apply 5524 }; 5525 5526 if (apply && this.element.value.length) { 5527 5528 var value = parseFloat(this.element.value); 5529 5530 if (isNaN(value)) { 5531 result.status = false; 5532 5533 } else if (typeof(this.element.min) !== 'undefined' && this.element.min > value) { 5534 result.status = false; 5535 result.message = 'Field too small!'; 5536 5537 } else if (typeof(this.element.max) !== 'undefined' && this.element.max < value) { 5538 5539 result.status = false; 5540 result.message = 'Field too big!'; 5541 } 5542 } 5543 5544 return result; 5545}; 5546 5547// Required field 5548CommonElement.prototype.validateRequired = function() 5549{ 5550 return { 5551 status: this.element.value !== null && this.element.value.length > 0, 5552 message: 'Field is required!', 5553 apply: true 5554 }; 5555}; 5556 5557// Handlers mechanism 5558 5559// Assign handlers 5560CommonElement.prototype.assignHandlers = function () 5561{ 5562 var o = this; 5563 5564 jQuery.each( 5565 this.handlers, 5566 function (index, elm) { 5567 if (elm.canApply.call(o)) { 5568 elm.handler.call(o); 5569 } 5570 } 5571 ); 5572}; 5573 5574// Handlers repository 5575CommonElement.prototype.handlers = [ 5576 { 5577 canApply: function () { 5578 return this.$element.hasClass('watcher'); 5579 }, 5580 handler: CommonElement.prototype.markAsWatcher 5581 }, 5582 { 5583 canApply: function () { 5584 return this.$element.hasClass('field-state') && this.$element.hasClass('linked'); 5585 }, 5586 handler: CommonElement.prototype.linkWithCountry 5587 }, 5588 { 5589 canApply: function () { 5590 return this.$element.hasClass('column-switcher') && this.$element.parents('th').length > 0; 5591 }, 5592 handler: CommonElement.prototype.markAsColumnSwitcher 5593 }, 5594 { 5595 canApply: function () { 5596 return this.$element.hasClass('wheel-ctrl'); 5597 }, 5598 handler: CommonElement.prototype.markAsWheelControlled 5599 }, 5600 { 5601 canApply: function () { 5602 return this.$element.is('textarea.resizeble-txt'); 5603 }, 5604 handler: function() { 5605 var min = this.$element.data('min-size-height') || this.$element.height(); 5606 var max = this.$element.data('max-size-height'); 5607 5608 this.$element.TextAreaExpander(min, max); 5609 } 5610 }, 5611 { 5612 canApply: function () { 5613 return this.$element; 5614 }, 5615 handler: function() { 5616 this.$element.blur( 5617 _.bind( 5618 function() { 5619 this.triggerVent('blur', this); 5620 }, 5621 this 5622 ) 5623 ); 5624 } 5625 }, 5626 { 5627 canApply: function () { 5628 return this.$element; 5629 }, 5630 handler: function() { 5631 this.$element.focus( 5632 _.bind( 5633 function() { 5634 this.triggerVent('focus', this); 5635 }, 5636 this 5637 ) 5638 ); 5639 } 5640 } 5641]; 5642 5643CommonElement.prototype.hasDependency = function () 5644{ 5645 return this.$element.closest('.has-dependency').length > 0; 5646}; 5647 5648CommonElement.prototype.getDependency = function () 5649{ 5650 return this.hasDependency() 5651 ? xcart.getCommentedData(this.$element.closest('.has-dependency'), 'depen
5651dency') 5652 : {}; 5653}; 5654 5655CommonElement.prototype.hideByDependency = function () 5656{ 5657 this.$element.closest('.has-dependency').addClass('hidden'); 5658}; 5659 5660CommonElement.prototype.showByDependency = function () 5661{ 5662 this.$element.closest('.has-dependency').removeClass('hidden'); 5663}; 5664 5665// Autostart 5666xcart.autoload(CommonForm); 5667 5668// Common controller as jQuery plugin 5669(function ($) { 5670 jQuery.fn.commonController = function(property) { 5671 var args = Array.prototype.slice.call(arguments, 1); 5672 5673 this.each( 5674 function() { 5675 if (typeof(this.commonController) === 'undefined') { 5676 if (isElement(this, 'form')) { 5677 new CommonForm(this); 5678 5679 } else if ( 5680 isElement(this, 'input') 5681 || isElement(this, 'select') 5682 || isElement(this, 'textarea') 5683 || isElement(this, 'button') 5684 ) { 5685 new CommonElement(this); 5686 } 5687 } 5688 5689 if ( 5690 typeof(this.commonController) !== 'undefined' 5691 && typeof(this.commonController[property]) !== 'undefined' 5692 ) { 5693 if (typeof(this.commonController[property]) === 'function') { 5694 this.commonController[property].apply(this.commonController, args); 5695 5696 } else { 5697 this.commonController[property] = args[0]; 5698 } 5699 } 5700 } 5701 ); 5702 5703 return this; 5704 }; 5705 5706})(jQuery);; 5707/* AUTOGENERATED: loadCSS.min.js */ 5708!function(c){"use strict";function e(e,t,n,o){var r,i=c.document,d=i.createElement("link");if(t)r=t;else{var a=(i.body||i.getElementsByTagName("head")[0]).childNodes;r=a[a.length-1]}var f=i.styleSheets;if(o)for(var l in o)o.hasOwnProperty(l)&&d.setAttribute(l,o[l]);d.rel="stylesheet",d.href=e,d.media="only x",function e(t){if(i.body)return t();setTimeout(function(){e(t)})}(function(){r.parentNode.insertBefore(d,t?r:r.nextSibling)});var s=function(e){for(var t=d.href,n=f.length;n--;)if(f[n].href===t)return e();setTimeout(function(){s(e)})};function u(){d.addEventListener&&d.removeEventListener("load",u),d.media=n||"all"}return d.addEventListener&&d.addEventListener("load",u),(d.onloadcssdefined=s)(u),d}"undefined"!=typeof exports?exports.loadCSS=e:c.loadCSS=e}("undefined"!=typeof global?global:this);; 5709/* AUTOGENERATED: onloadCSS.min.js */ 5710function onloadCSS(n,a){var t;function d(){!t&&a&&(t=!0,a.call(n))}n.addEventListener&&n.addEventListener("load",d),n.attachEvent&&n.attachEvent("onload",d),"isApplicationInstalled"in navigator&&"onloadcssdefined"in n&&n.onloadcssdefined(d)}; 5711/* AUTOGENERATED: Function.name.js */ 5712(function() { 5713 5714 var fnNameMatchRegex = /^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^\(\s\/]*)\s*/; 5715 5716 function _name() { 5717 var match, name; 5718 if (this === Function || this === Function.prototype.constructor) { 5719 name = "Function"; 5720 } 5721 else if (this !== Function.prototype) { 5722 match = ("" + this).match(fnNameMatchRegex); 5723 name = match && match[1]; 5724 } 5725 return name || ""; 5726 } 5727 5728// Inspect the polyfill-ability of this browser 5729 var needsPolyfill = !("name" in Function.prototype && "name" in (function x() {})); 5730 var canDefineProp = typeof Object.defineProperty === "function" && 5731 (function() { 5732 var result; 5733 try { 5734 Object.defineProperty(Function.prototype, "_xyz", { 5735 get: function() { 5736 return "blah"; 5737 }, 5738 configurable: true 5739 }); 5740 result = Function.prototype._xyz === "blah"; 5741 delete Function.prototype._xyz; 5742 } 5743 catch (e) { 5744 result = false;
5745 } 5746 return result; 5747 })(); 5748 var canDefineGetter = typeof Object.prototype.__defineGetter__ === "function" && 5749 (function() { 5750 var result; 5751 try { 5752 Function.prototype.__defineGetter__("_abc", function() { 5753 return "foo"; 5754 }); 5755 result = Function.prototype._abc === "foo"; 5756 delete Function.prototype._abc; 5757 } 5758 catch (e) { 5759 result = false; 5760 } 5761 return result; 5762 })(); 5763 5764 5765 5766// Add the "private" property for testing, even if the real property can be polyfilled 5767 Function.prototype._name = _name; 5768 5769 5770// Polyfill it! 5771// For: 5772// * IE >=9 <12 5773// * Chrome <33 5774 if (needsPolyfill) { 5775 // For: 5776 // * IE >=9 <12 5777 // * Chrome >=5 <33 5778 if (canDefineProp) { 5779 Object.defineProperty(Function.prototype, "name", { 5780 get: function() { 5781 var name = _name.call(this); 5782 5783 // Since named function definitions have immutable names, also memoize the 5784 // output by defining the `name` property directly on this Function 5785 // instance so that this polyfill will not need to be invoked again 5786 if (this !== Function.prototype) { 5787 Object.defineProperty(this, "name", { 5788 value: name, 5789 configurable: true 5790 }); 5791 } 5792 5793 return name; 5794 }, 5795 configurable: true 5796 }); 5797 } 5798 // For: 5799 // * Chrome <5 5800 else if (canDefineGetter) { 5801 // NOTE: 5802 // The snippet: 5803 // 5804 // x.__defineGetter__('y', z); 5805 // 5806 // ...is essentially equivalent to: 5807 // 5808 // Object.defineProperty(x, 'y', { 5809 // get: z, 5810 // configurable: true, // <-- key difference #1 5811 // enumerable: true // <-- key difference #2 5812 // }); 5813 // 5814 Function.prototype.__defineGetter__("name", function() { 5815 var name = _name.call(this); 5816 5817 // Since named function definitions have immutable names, also memoize the 5818 // output by defining the `name` property directly on this Function 5819 // instance so that this polyfill will not need to be invoked again 5820 if (this !== Function.prototype) { 5821 this.__defineGetter__("name", function() { return name; }); 5822 } 5823 5824 return name; 5825 }); 5826 } 5827 } 5828 5829})();; 5830/* AUTOGENERATED: php.min.js */ 5831function var_export(mixed_expression,bool_return){var retstr='',iret='',cnt=0,x=[],i=0,funcParts=[],idtLevel=arguments[2]||2,innerIndent='',outerIndent='',getFuncName=function(fn){var name=/\W*function\s+([\w\$]+)\s*\(/.exec(fn);if(!name)return'(Anonymous)';return name[1]},_makeIndent=function(idtLevel){return(new Array(idtLevel+1)).join(' ')},__getType=function(inp){var i=0,match,type=typeof inp;if(type==='object'&&inp!==null&&inp.constructor&&getFuncName(inp.constructor)==='PHPJS_Resource')return'resource';if(type==='function')return'function';if(type==='object'&&!inp)return'null';if(type==="object"){if(!inp.constructor)return'object';var cons=inp.constructor.toString();match=cons.match(/(\w+)\(/);if(match)cons=match[1].toLowerCase();var types=["boolean","number","string","array"];for(i=0;i<types.length;i++)if(cons===types[i]){type=types[i];break}};return type},type=__getType(mixed_expression);if(type===null){retstr="NULL"}else if(type==='array'||type==='object'){outerIndent=_makeIndent(idtLevel-2);innerIndent=_makeIndent(idtLevel);for(i in mixed_expression){var value=this.var_export(mixed_expression[i],true,idtLevel+2);x[cnt++]=innerIndent+i+' => '+(__getType(mixed_expression[i])==='array'?'\n':'')+value};iret=x.join(',\n');retstr=outerIndent+"array (\n"+iret+'\n'+outerIndent+')'}else if(type==='function'){funcParts=mixed_expression.toString().match(/function .*?\((.*?)\) \{([\s\S]*)\}/);retstr="create_function ('"+funcParts[1]+"', '"+funcParts[2].replace(new RegExp("'",'g'),"\\'")+"')"}else if(type==='resource'){retstr='NULL'}else retstr=(typeof mixed_expression!=='string')?mixed_expression:"'"+mixed_expression.replace(/(["'])/g,"\\$1").replace(/\0/g,"\\0")+"'";if(bool_return!==true){this.echo(retstr);return null}else return retstr} 5832function is_null(mixed_var){return(mixed_var===null)} 5833function echo(){var arg='',argc=arguments.length,argv=arguments,i=0,holder,win=this.window,d=win.document,ns_xhtml='http://www.w3.org/1999/xhtml',ns_xul='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul',stringToDOM=function(str,parent,ns,container){var extraNSs='';if(ns===ns_xul)extraNSs=' xmlns:html="'+ns_xhtml+'"';var stringContainer='<'+container+' xmlns="'+ns+'"'+extraNSs+'>'+str+'</'+container+'>',dils=win.DOMImplementationLS,dp=win.DOMParser,ax=win.ActiveXObject;if(dils&&dils.createLSInput&&dils.createLSParser){var lsInput=dils.createLSInput();lsInput.stringData=stringContainer;var lsParser=dils.createLSParser(1,null);return lsParser.parse(lsInput).firstChild}else if(dp){try{var fc=new dp().parseFromString(stringContainer,'text/xml');if(fc&&fc.documentElement&&fc.documentElement.localName!=='parsererror'&&fc.documentElement.namespaceURI!=='http://www.mozilla.org/newlayout/xml/parsererror.xml')return fc.documentElement.firstChild}catch(e){}}else if(ax){var axo=new ax('MSXML2.DOMDocument');axo.loadXML(str);return axo.documentElement};if(d.createElementNS&&(d.documentElement.namespaceURI||d.documentElement.nodeName.toLowerCase()!=='html'||(d.contentType&&d.contentType!=='text/html'))){holder=d.createElementNS(ns,container)}else holder=d.createElement(container);holder.innerHTML=str;while(holder.firstChild)parent.appendChild(holder.firstChild);return false},ieFix=function(node){if(node.nodeType===1){var newNode=d.createElement(node.nodeName),i,len;if(node.attributes&&node.attributes.length>0)for(i=0,len=node.attributes.length;i<len;i++)newNode.setAttribute(node.attributes[i].nodeName,node.getAttribute(node.attributes[i].nodeName));if(node.childNodes&&node.childNodes.length>0)for(i=0,len=node.childNodes.length;i<len;
5833i++)newNode.appendChild(ieFix(node.childNodes[i]));return newNode}else return d.createTextNode(node.nodeValue)},replacer=function(s,m1,m2){if(m1!=='\\'){return m1+eval(m2)}else return s};this.php_js=this.php_js||{};var phpjs=this.php_js,ini=phpjs.ini,obs=phpjs.obs;for(i=0;i<argc;i++){arg=argv[i];if(ini&&ini['phpjs.echo_embedded_vars'])arg=arg.replace(/(.?)\{?\$(\w*?\}|\w*)/g,replacer);if(!phpjs.flushing&&obs&&obs.length){obs[obs.length-1].buffer+=arg;continue};if(d.appendChild){if(d.body){if(win.navigator.appName==='Microsoft Internet Explorer'){d.body.appendChild(stringToDOM(ieFix(arg)))}else{var unappendedLeft=stringToDOM(arg,d.body,ns_xhtml,'div').cloneNode(true);if(unappendedLeft)d.body.appendChild(unappendedLeft)}}else d.documentElement.appendChild(stringToDOM(arg,d.documentElement,ns_xul,'description'))}else if(d.write)d.write(arg)}} 5834function htmlspecialchars(string,quote_style,charset,double_encode){var optTemp=0,i=0,noquotes=false;if(typeof quote_style==='undefined'||quote_style===null)quote_style=2;string=string.toString();if(double_encode!==false)string=string.replace(/&/g,'&');string=string.replace(/</g,'<').replace(/>/g,'>').replace(/\s/g,' ');var OPTS={ENT_NOQUOTES:0,ENT_HTML_QUOTE_SINGLE:1,ENT_HTML_QUOTE_DOUBLE:2,ENT_COMPAT:2,ENT_QUOTES:3,ENT_IGNORE:4};if(quote_style===0)noquotes=true;if(typeof quote_style!=='number'){quote_style=[].concat(quote_style);for(i=0;i<quote_style.length;i++)if(OPTS[quote_style[i]]===0){noquotes=true}else if(OPTS[quote_style[i]])optTemp=optTemp|OPTS[quote_style[i]];quote_style=optTemp};if(quote_style&OPTS.ENT_HTML_QUOTE_SINGLE)string=string.replace(/'/g,''');if(!noquotes)string=string.replace(/"/g,'"');return string} 5835function htmlspecialchars_decode(string,quote_style){var optTemp=0,i=0,noquotes=false;if(typeof quote_style==='undefined')quote_style=2;string=string.toString().replace(/</g,'<').replace(/>/g,'>').replace(/ /g,' ');var OPTS={ENT_NOQUOTES:0,ENT_HTML_QUOTE_SINGLE:1,ENT_HTML_QUOTE_DOUBLE:2,ENT_COMPAT:2,ENT_QUOTES:3,ENT_IGNORE:4};if(quote_style===0)noquotes=true;if(typeof quote_style!=='number'){quote_style=[].concat(quote_style);for(i=0;i<quote_style.length;i++)if(OPTS[quote_style[i]]===0){noquotes=true}else if(OPTS[quote_style[i]])optTemp=optTemp|OPTS[quote_style[i]];quote_style=optTemp};if(quote_style&OPTS.ENT_HTML_QUOTE_SINGLE)string=string.replace(/�*39;/g,"'");if(!noquotes)string=string.replace(/"/g,'"');string=string.replace(/&/g,'&');return string} 5836function str_replace(search,replace,subject,count){var i=0,j=0,temp='',repl='',sl=0,fl=0,f=[].concat(search),r=[].concat(replace),s=subject,ra=Object.prototype.toString.call(r)==='[object Array]',sa=Object.prototype.toString.call(s)==='[object Array]';s=[].concat(s);if(count)this.window[count]=0;for(i=0,sl=s.length;i<sl;i++){if(s[i]==='')continue;for(j=0,fl=f.length;j<fl;j++){temp=s[i]+'';repl=ra?(r[j]!==undefined?r[j]:''):r[0];s[i]=temp.split(f[j]).join(repl);if(count&&s[i]!==temp)this.window[count]+=(temp.length-s[i].length)/f[j].length}};return sa?s:s[0]} 5837function array_merge(){var args=Array.prototype.slice.call(arguments),argl=args.length,arg,retObj={},k='',argil=0,j=0,i=0,ct=0,toStr=Object.prototype.toString,retArr=true;for(i=0;i<argl;i++)if(toStr.call(args[i])!=='[object Array]'){retArr=false;break};if(retArr){retArr=[];for(i=0;i<argl;i++)retArr=retArr.concat(args[i]);return retArr};for(i=0,ct=0;i<argl;i++){arg=args[i];if(toStr.call(arg)==='[object Array]'){for(j=0,argil=arg.length;j<argil;j++)retObj[ct++]=arg[j]}else for(k in arg)if(arg.hasOwnProperty(k))if(parseInt(k,10)+''===k){retObj[ct++]=arg[k]}else retObj[k]=arg[k]};return retObj} 5838function array_unique(inputArr){var key='',tmp_arr2={},val='',__array_search=function(needle,haystack){var fkey='';for(fkey in haystack)if(haystack.hasOwnProperty(fkey))if((haystack[fkey]+'')===(needle+''))return fkey;return false};for(key in inputArr)if(inputArr.hasOwnProperty(key)){val=inputArr[key];if(false===__array_search(val,tmp_arr2))tmp_arr2[key]=val};return tmp_arr2} 5839function intval(mixed_var,base){var tmp,type=typeof mixed_var;if(type==='boolean'){return+mixed_var}else if(type==='string'){tmp=parseInt(mixed_var,base||10);return(isNaN(tmp)||!isFinite(tmp))?0:tmp}else if(type==='number'&&isFinite(mixed_var)){return mixed_var|0}else return 0}; 5840/* AUTOGENERATED: amd.js */ 5841/* vim: set ts=2 sw=2 sts=2 et: */ 5842 5843/** 5844 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 5845 * See https://www.x-cart.com/license-agreement.html for license details. 5846 */ 5847 5848var CoreAMD = { 5849 pending: {}, 5850 5851 define: function (name, dependencies, callback) { 5852 5853 if (_.isFunction(dependencies)) {
5854 callback = dependencies; 5855 dependencies = []; 5856 } 5857 5858 if (_.isString(dependencies)) { 5859 dependencies = [dependencies]; 5860 } 5861 5862 if (dependencies === undefined) { 5863 dependencies = []; 5864 } 5865 5866 if (callback === undefined) { 5867 callback = function () { 5868 }; 5869 } 5870 5871 var moduleDeferred = this._createDeferred(name); 5872 5873 jQuery 5874 .when.apply(jQuery, dependencies.map(_.bind(this._createDeferred, this))) 5875 .done(function () { 5876 moduleDeferred.resolve(callback.apply(window, arguments)); 5877 }) 5878 }, 5879 5880 require: function (dependencies, callback) { 5881 if (_.isString(dependencies)) { 5882 dependencies = [dependencies]; 5883 } 5884 5885 jQuery 5886 .when.apply(jQuery, dependencies.map(_.bind(this._createDeferred, this))) 5887 .done(function () { 5888 callback.apply(window, arguments); 5889 }); 5890 }, 5891 5892 getUnresolvedDependencies: function () { 5893 var result = []; 5894 for (var name in this.pending) if (this.pending.hasOwnProperty(name)) { 5895 if (this.pending[name].state() === 'pending') { 5896 result.push(name); 5897 } 5898 } 5899 5900 return result; 5901 }, 5902 5903 _createDeferred: function (name) { 5904 if (this.pending[name] === undefined) { 5905 this.pending[name] = new jQuery.Deferred(); 5906 } 5907 5908 return this.pending[name]; 5909 } 5910}; 5911 5912if (window.define) { 5913 window._define = window.define; 5914} 5915window.define = _.bind(CoreAMD.define, CoreAMD); 5916 5917if (window.require) { 5918 window._require = window.require; 5919} 5920window.require = _.bind(CoreAMD.require, CoreAMD); 5921 5922define('js/jquery', function () { 5923 return jQuery; 5924}); 5925define('js/underscore', function () { 5926 return _; 5927}); 5928 5929jQuery(function () { 5930 define('ready'); 5931 5932 setTimeout(function() { 5933 var unresolvedDependencies = CoreAMD.getUnresolvedDependencies(); 5934 if (unresolvedDependencies.length && xcart.isDeveloperMode) { 5935 console.warn('Unresolved dependencies', unresolvedDependencies); 5936 } 5937 }, 1); 5938}); 5939 5940(function () { 5941 var event = document.createEvent('HTMLEvents'); 5942 event.initEvent('amd-ready', true, true); 5943 document.dispatchEvent(event); 5944})();; 5945/* AUTOGENERATED: translate.js */ 5946/* vim: set ts=2 sw=2 sts=2 et: */ 5947 5948/** 5949 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 5950 * See https://www.x-cart.com/license-agreement.html for license details. 5951 */ 5952 5953var Translator = Object.extend({ 5954 languageLabels: [], 5955 5956 constructor: function TranslatorConstructor() { 5957 this.loadPreloadedLabels(); 5958 }, 5959 5960 loadPreloadedLabels: function () { 5961 this.loadLanguageHash( 5962 window.xlite_preloaded_labels 5963 ); 5964 }, 5965 5966 translate: function(label, params) 5967 { 5968 var translation = this._findInLoaded(label); 5969 5970 if (translation === null) { 5971 translation = this._loadLabel(label); 5972 5973 if (translation) { 5974 this._saveToLoaded(label, translation); 5975 } 5976 } 5977 5978 if (params) { 5979 translation = this._processTranslationParams(translation, params) 5980 } 5981 5982 return translation; 5983 }, 5984 5985 5986 loadLanguageHash: function(hash) 5987 { 5988 _.each( 5989 hash, 5990 _.bind( 5991 function (translation, label) { 5992 var foundTranslation = this._findInLoaded(label); 5993 5994 if (foundTranslation === null) { 5995 this._saveToLoaded(label, translation); 5996 } 5997 }, 5998 this 5999 ) 6000 ); 6001 }, 6002 6003 _processTranslationParams: function(translation, params) { 6004 _.each(params, function (paramValue, paramName) { 6005 translation = translation.replace('{{' + paramName + '}}', paramValue); 6006 }); 6007 6008 return translation; 6009 }, 6010 6011 _findInLoaded: function(label) { 6012 var translation = null; 6013 6014 for (var i = 0; i < this.languageLabels.length; i++) { 6015 if (this.languageLabels[i].name == label) { 6016 translation = this.languageLabels[i].label; 6017 break; 6018 } 6019 } 6020 6021 return translation; 6022 }, 6023 6024 _saveToLoaded: function(label, translation) { 6025 this.languageLabels.push( 6026 { 6027 name: label, 6028 label: translation 6029 } 6030 ); 6031 }, 6032 6033 _loadLabel: function(label) { 6034 return xcart.rest.get('translation', label, false); 6035 }, 6036 6037});; 6038/* AUTOGENERATED: lazysizes.min.js */ 6039/*! lazysizes - v5.2.1 */ 6040 6041!function(e){var t=function(u,D,f){"use strict";var k,H;if(function(){var e;var t={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:true,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:true,ricTimeout:0,throttleDelay:125};H=u.lazySizesConfig||u.lazysizesConfig||{};for(e in t){if(!(e in H)){H[e]=t[e]}}}(),!D||!D.getElementsByClassName){return{init:function(){},cfg:H,noSupport:true}}var O=D.documentElement,a=u.HTMLPictureElement,P="addEventListener",$="getAttribute",q=u[P].bind(u),I=u.setTimeout,U=u.requestAnimationFrame||I,l=u.requestIdleCallback,j=/^picture$/i,r=["load","error","lazyincluded","_lazyloaded"],i={},G=Array.prototype.forEach,J=function(e,t){if(!i[t]){i[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")}return i[t].test(e[$]("class")||"")&&i[t]},K=function(e,t){if(!J(e,t)){e.setAttribute("class",(e[$]("class")||"").trim()+" "+t)}},Q=function(e,t){var i;if(i=J(e,t)){e.setAttribute("class",(e[$]("class")||"").replace(i," "))}},V=function(t,i,e){var a=e?P:"removeEventListener";if(e){V(t,i)}r.forEach(function(e){t[a](e,i)})},X=function(e,t,i,a,r){var n=D.createEvent("Event");
vendor: 5,178 bytes, line 6041
6041if(!i){i={}}i.instance=k;n.initEvent(t,!a,!r);n.detail=i;e.dispatchEvent(n);return n},Y=function(e,t){var i;if(!a&&(i=u.picturefill||H.pf)){if(t&&t.src&&!e[$]("srcset")){e.setAttribute("srcset",t.src)}i({reevaluate:true,elements:[e]})}else if(t&&t.src){e.src=t.src}},Z=function(e,t){return(getComputedStyle(e,null)||{})[t]},s=function(e,t,i){i=i||e.offsetWidth;while(i<H.minSize&&t&&!e._lazysizesWidth){i=t.offsetWidth;t=t.parentNode}return i},ee=function(){var i,a;var t=[];var r=[];var n=t;var s=function(){var e=n;n=t.length?r:t;i=true;a=false;while(e.length){e.shift()()}i=false};var e=function(e,t){if(i&&!t){e.apply(this,arguments)}else{n.push(e);if(!a){a=true;(D.hidden?I:U)(s)}}};e._lsFlush=s;return e}(),te=function(i,e){return e?function(){ee(i)}:function(){var e=this;var t=arguments;ee(function(){i.apply(e,t)})}},ie=function(e){var i;var a=0;var r=H.throttleDelay;var n=H.ricTimeout;var t=function(){i=false;a=f.now();e()};var s=l&&n>49?function(){l(t,{timeout:n});if(n!==H.ricTimeout){n=H.ricTimeout}}:te(function(){I(t)},true);return function(e){var t;if(e=e===true){n=33}if(i){return}i=true;t=r-(f.now()-a);if(t<0){t=0}if(e||t<9){s()}else{I(s,t)}}},ae=function(e){var t,i;var a=99;var r=function(){t=null;e()};var n=function(){var e=f.now()-i;if(e<a){I(n,a-e)}else{(l||r)(r)}};return function(){i=f.now();if(!t){t=I(n,a)}}},e=function(){var v,m,c,h,e;var y,z,g,p,C,b,A;var n=/^img$/i;var d=/^iframe$/i;var E="onscroll"in u&&!/(gle|ing)bot/.test(navigator.userAgent);var _=0;var w=0;var N=0;var M=-1;var x=function(e){N--;if(!e||N<0||!e.target){N=0}};var W=function(e){if(A==null){A=Z(D.body,"visibility")=="hidden"}return A||!(Z(e.parentNode,"visibility")=="hidden"&&Z(e,"visibility")=="hidden")};var S=function(e,t){var i;var a=e;var r=W(e);g-=t;b+=t;p-=t;C+=t;while(r&&(a=a.offsetParent)&&a!=D.body&&a!=O){r=(Z(a,"opacity")||1)>0;if(r&&Z(a,"overflow")!="visible"){i=a.getBoundingClientRect();r=C>i.left&&p<i.right&&b>i.top-1&&g<i.bottom+1}}return r};var t=function(){var e,t,i,a,r,n,s,l,o,u,f,c;var d=k.elements;if((h=H.loadMode)&&N<8&&(e=d.length)){t=0;M++;for(;t<e;t++){if(!d[t]||d[t]._lazyRace){continue}if(!E||k.prematureUnveil&&k.prematureUnveil(d[t])){R(d[t]);continue}if(!(l=d[t][$]("data-expand"))||!(n=l*1)){n=w}if(!u){u=!H.expand||H.expand<1?O.clientHeight>500&&O.clientWidth>500?500:370:H.expand;k._defEx=u;f=u*H.expFactor;c=H.hFac;A=null;if(w<f&&N<1&&M>2&&h>2&&!D.hidden){w=f;M=0}else if(h>1&&M>1&&N<6){w=u}else{w=_}}if(o!==n){y=innerWidth+n*c;z=innerHeight+n;s=n*-1;o=n}i=d[t].getBoundingClientRect();if((b=i.bottom)>=s&&(g=i.top)<=z&&(C=i.right)>=s*c&&(p=i.left)<=y&&(b||C||p||g)&&(H.loadHidden||W(d[t]))&&(m&&N<3&&!l&&(h<3||M<4)||S(d[t],n))){R(d[t]);r=true;if(N>9){break}}else if(!r&&m&&!a&&N<4&&M<4&&h>2&&(v[0]||H.preloadAfterLoad)&&(v[0]||!l&&(b||C||p||g||d[t][$](H.sizesAttr)!="auto"))){a=v[0]||d[t]}}if(a&&!r){R(a)}}};var i=ie(t);var B=function(e){var t=e.target;if(t._lazyCache){delete t._lazyCache;return}x(e);K(t,H.loadedClass);Q(t,H.loadingClass);V(t,L);X(t,"lazyloaded")};var a=te(B);var L=function(e){a({target:e.target})};var T=function(t,i){try{t.contentWindow.location.replace(i)}catch(e){t.src=i}};var F=function(e){var t;var i=e[$](H.srcsetAttr);if(t=H.customMedia[e[$]("data-media")||e[$]("media")]){e.setAttribute("media",t)}if(i){e.setAttribute("srcset",i)}};var s=te(function(t,e,i,a,r){var n,s,l,o,u,f;if(!(u=X(t,"lazybeforeunveil",e)).defaultPrevented){if(a){if(i){K(t,H.autosizesClass)}else{t.setAttribute("sizes",a)}}s=t[$](H.srcsetAttr);n=t[$](H.srcAttr);if(r){l=t.parentNode;o=l&&j.test(l.nodeName||"")}f=e.firesLoad||"src"in t&&(s||n||o);u={target:t};K(t,H.loadingClass);if(f){clearTimeout(c);c=I(x,2500);V(t,L,true)}if(o){G.call(l.getElementsByTagName("source"),F)}if(s){t.setAttribute("srcset",s)}else if(n&&!o){if(d.test(t.nodeName)){T(t,n)}else{t.src=n}}if(r&&(s||o)){Y(t,{src:n})}}if(t._lazyRace){delete t._lazyRace}Q(t,H.lazyClass);ee(function(){var e=t.complete&&t.naturalWidth>1;if(!f||e){if(e){K(t,"ls-is-cached")}B(u);t._lazyCache=true;I(function(){if("_lazyCache"in t){delete t._lazyCache}},9)}if(t.loading=="lazy"){N--}},true)});var R=function(e){if(e._lazyRace){return}var t;var i=n.test(e.nodeName);var a=i&&(e[$](H.sizesAttr)||e[$]("sizes"));var r=a=="auto";if((r||!m)&&i&&(e[$]("src")||e.srcset)&&!e.complete&&!J(e,H.errorClass)&&J(e,H.lazyClass)){return}t=X(e,"lazyunveilread").detail;if(r){re.updateElem(e,true,e.offsetWidth)}e._lazyRace=true;N++;s(e,t,r,a,i)};var r=ae(function(){H.loadMode=3;i()});var l=function(){if(H.loadMode==3){H.loadMode=2}r()};var o=function(){if(m){return}if(f.now()-e<999){I(o,999);return}m=true;H.loadMode=3;i();q("scroll",l,true)};return{_:function(){e=f.now();k.elements=D.getElementsByClassName(H.lazyClass);v=D.getElementsByClassName(H.lazyClass+" "+H.preloadClass);q("scroll",i,true);q("resize",i,true);q("pageshow",function(e){if(e.persisted){var t=D.querySelectorAll("."+H.loadingClass);if(t.length&&t.forEach){U(function(){t.forEach(function(e){if(e.complete){R(e)}})})}}});if(u.MutationObserver){new MutationObserver(i).observe(O,{childList:true,subtree:true,attributes:true})}else{O[P]("DOMNodeInserted",i,true);O[P]("DOMAttrModified",i,true);setInterval(i,999)}
6041q("hashchange",i,true);["focus","mouseover","click","load","transitionend","animationend"].forEach(function(e){D[P](e,i,true)});if(/d$|^c/.test(D.readyState)){o()}else{q("load",o);D[P]("DOMContentLoaded",i);I(o,2e4)}if(k.elements.length){t();ee._lsFlush()}else{i()}},checkElems:i,unveil:R,_aLSL:l}}(),re=function(){var i;var n=te(function(e,t,i,a){var r,n,s;e._lazysizesWidth=a;a+="px";e.setAttribute("sizes",a);if(j.test(t.nodeName||"")){r=t.getElementsByTagName("source");for(n=0,s=r.length;n<s;n++){r[n].setAttribute("sizes",a)}}if(!i.detail.dataAttr){Y(e,i.detail)}});var a=function(e,t,i){var a;var r=e.parentNode;if(r){i=s(e,r,i);a=X(e,"lazybeforesizes",{width:i,dataAttr:!!t});if(!a.defaultPrevented){i=a.detail.width;if(i&&i!==e._lazysizesWidth){n(e,r,a,i)}}}};var e=function(){var e;var t=i.length;if(t){e=0;for(;e<t;e++){a(i[e])}}};var t=ae(e);return{_:function(){i=D.getElementsByClassName(H.autosizesClass);q("resize",t)},checkElems:t,updateElem:a}}(),t=function(){if(!t.i&&D.getElementsByClassName){t.i=true;re._();e._()}};return I(function(){H.init&&t()}),k={cfg:H,autoSizer:re,loader:e,init:t,uP:Y,aC:K,rC:Q,hC:J,fire:X,gW:s,rAF:ee}}(e,e.document,Date);e.lazySizes=t,"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:{});; 6042/* AUTOGENERATED: tooltip.js */ 6043/* vim: set ts=2 sw=2 sts=2 et: */ 6044 6045/** 6046 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 6047 * See https://www.x-cart.com/license-agreement.html for license details. 6048 */ 6049 6050jQuery.fn.extend({ 6051 startTooltip: function() { 6052 return this.each(function() { 6053 window.startTooltip(this); 6054 }); 6055 }, 6056 popoverKeepOnHover: function () { 6057 var keepOnHoverInit = function (element) { 6058 var debouncedToggle = _.debounce(function(element, option) { 6059 if (option === 'show' 6060 && $(element).data('bs.popover') 6061 && $(element).data('bs.popover').$tip 6062 && $(element).data('bs.popover').$tip.is(':visible') 6063 ) { 6064 return; 6065 } 6066 6067 $(element).popover(option); 6068 }, 150); 6069 6070 $(element).on("mouseenter", function () { 6071 var _this = this; 6072 debouncedToggle($(_this), 'show'); 6073 }).on("mouseleave", function () { 6074 var _this = this; 6075 var hoveredPopover = $(".popover:hover"); 6076 if (!hoveredPopover.length) { 6077 debouncedToggle($(_this), 'hide'); 6078 } else { 6079 hoveredPopover.on("mouseleave", function() { 6080 debouncedToggle($(_this), 'hide'); 6081 }); 6082 } 6083 }); 6084 }; 6085 6086 return this.each(function() { 6087 keepOnHoverInit(this); 6088 }); 6089 } 6090}); 6091 6092(function ($) { 6093 6094 // Tooltips in customer area 6095 jQuery('.tooltip-main').each( 6096 function () { 6097 attachTooltip( 6098 jQuery('i', this), 6099 jQuery('.help-text', this).hide().html() 6100 ); 6101 } 6102 ); 6103 6104 window.startTooltip = function (element) { 6105 var helpId = $(element).data('help-id'); 6106 var params = {sanitize: false}; 6107 6108 if ($(element).parents('.ui-widget-content').first().length) { 6109 params.viewport = ('#' + $(element).parents('.ui-widget-content').first().attr('id')); 6110 } 6111 6112 const container = ($(element).data('container')) 6113 const isNeedRenderInContainer = container && container !== '' 6114 if (isNeedRenderInContainer) { 6115 params.container = container 6116 } 6117 6118 if (helpId) { 6119 content = $('#' + helpId).html(); 6120 if (content) { 6121 params.content = content; 6122 $(element).popover(params); 6123 } 6124 } else { 6125 const getContainerElement = (elm) => { 6126 if (getComputedStyle(elm.parentElement).position === 'absolute') { 6127 return elm.parentElement.parentElement; 6128 } 6129 return elm; 6130 }; 6131 if (!isNeedRenderInContainer) { 6132 params.container = getContainerElement(element) || element; 6133 } 6134 $(element).popover(params); 6135 } 6136 6137 if ($(element).data('keep-on-hover')) { 6138 $(element).popoverKeepOnHover(); 6139 } 6140 }; 6141 6142 define('xlite-tooltip', ['vue/vue'], function (Vue) { 6143 Vue.directive('xlite-tooltip', { 6144 inserted: function (el) { 6145 startTooltip(el); 6146 } 6147 }); 6148 }); 6149 6150})(jQuery); 6151 6152xcart.microhandlers.add( 6153 'Tooltip', 6154 '[data-toggle="popover"]', 6155 function () { 6156 startTooltip(this); 6157 } 6158);; 6159/* AUTOGENERATED: popover.js */ 6160/* vim: set ts=2 sw=2 sts=2 et: */ 6161 6162/** 6163 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 6164 * See https://www.x-cart.com/license-agreement.html for license details. 6165 */ 6166 6167if ($.fn.popover) { 6168 let myDefaultWhiteList = $.fn.popover.Constructor.DEFAULTS.whiteList; 6169 6170 myDefaultWhiteList.input = []; 6171 myDefaultWhiteList.textarea = []; 6172 myDefaultWhiteList.select = []; 6173 myDefaultWhiteList.button = []; 6174 myDefaultWhiteList.table = []; 6175 myDefaultWhiteList.th = []; 6176 myDefaultWhiteList.tr = []; 6177 myDefaultWhiteList.td = []; 6178 6179 myDefaultWhiteList['*'].push('type', 'width', 'height'); 6180}; 6181/* AUTOGENERATED: mode-switcher.js */ 6182/* vim: set ts=2 sw=2 sts=2 et: */ 6183 6184/** 6185 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 6186 * See https://www.x-cart.com/license-agreement.html for license details. 6187 */ 6188 6189const ModeSwitcher = function () { 6190 const switchers = document.querySelectorAll('.switcher--mode-switcher'); 6191 const THEME_DARK = 'dark'; 6192 const THEME_LIGHT = 'light'; 6193 const COOKIE_NAME = 'theme'; 6194 const THEME_ATTRIBUTE = 'data-theme'; 6195 const THEME_SYSTEM_ATTRIBUTE = 'data-theme-system'; 6196 6197 /** 6198 * Detect if dark theme is enabled (manually or automatically). 6199 * 6200 * @return {boolean} True if dark theme is enabled (manually or automatically), false otherwise. 6201 */ 6202 this.isDarkModeEnabled = () => { 6203 const cookie = $.cookie(COOKIE_NAME); 6204 return cookie ? cookie === THEME_DARK : document.documentElement.getAttribute(THEME_ATTRIBUTE) === THEME_DARK; 6205 }; 6206 6207 /** 6208 * Toggle on/off all theme switchers on the page. 6209 * 6210 * @param {boolean} [on] If true, switchers will be enabled. Otherwise, disabled. 6211 */ 6212 this.switch = (on) => { 6213 if (typeof on === 'undefined') { 6214 on = !this.isDarkModeEnabled(); 6215 } 6216 6217 const doc = document.documentElement; 6218 const newTheme = on ? THEME_DARK : THEME_LIGHT; 6219 doc.setAttribute(THEME_ATTRIBUTE, newTheme); 6220 doc.removeAttribute(THEME_SYSTEM_ATTRIBUTE); 6221 $.cookie(COOKIE_NAME, newTheme, {path: xliteConfig.web_dir}); 6222 xcart.trigger('theme_changed', newTheme); 6223 }; 6224 6225 this.init = () => { 6226 const isDarkMode = this.isDarkModeEnabled(); 6227
6228 switchers.forEach(switcher => { 6229 switcher.addEventListener('change', () => { 6230 this.switch(!this.isDarkModeEnabled()); 6231 }); 6232 6233 switcher.checked = isDarkMode; 6234 }); 6235 }; 6236}; 6237 6238ModeSwitcher.prototype.instance = null; 6239 6240ModeSwitcher.getInstance = () => { 6241 if (!ModeSwitcher.prototype.instance) { 6242 ModeSwitcher.prototype.instance = new ModeSwitcher(); 6243 ModeSwitcher.prototype.instance.init(); 6244 } 6245 6246 return ModeSwitcher.prototype.instance; 6247}; 6248 6249ModeSwitcher.getInstance();; 6250/* AUTOGENERATED: sdk.js */ 6251/* vim: set ts=2 sw=2 sts=2 et: */ 6252 6253/** 6254 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 6255 * See https://www.x-cart.com/license-agreement.html for license details. 6256 */ 6257 6258define('paypal_sdk_loader', ['js/jquery'], function ($) { 6259 function loadPayPalSdk(SDKParams, PartnerAttributionId, ClientToken, SdkToken, PayPal3Dsecure, callback) { 6260 if (SDKParams === null) { 6261 console.warn('PayPal is not configured') 6262 return false; 6263 } 6264 6265 const PAYPAL_SCRIPT = 'https://www.paypal.com/sdk/js?' + SDKParams 6266 6267 const container = document.body || document.head 6268 callback = callback || function() {} 6269 6270 const script = document.createElement('script') 6271 script.setAttribute('src', PAYPAL_SCRIPT) 6272 script.setAttribute('async', true) 6273 script.setAttribute('data-partner-attribution-id', PartnerAttributionId) 6274 6275 if (ClientToken) { 6276 script.setAttribute('data-client-token', ClientToken) 6277 } 6278 if (SdkToken) { 6279 script.setAttribute('data-sdk-client-token', SdkToken); 6280 } 6281 6282 script.onload = function() { callback() } 6283 script.onerror = function(err) { callback(err) } 6284 6285 container.appendChild(script) 6286 } 6287 6288 const bodySector = $('body') 6289 const SDKParams = xcart.getCommentedData(bodySector, 'PayPalSDKParams') 6290 const PartnerAttributionId = xcart.getCommentedData(bodySector, 'PayPalPartnerAttributionId') 6291 const PayPal3Dsecure = xcart.getCommentedData(bodySector, 'PayPal3Dsecure') 6292 const ClientToken = xcart.getCommentedData(bodySector, 'PayPalClientToken') 6293 const SdkToken = xcart.getCommentedData(bodySector, 'PayPalSdkToken'); 6294 6295 loadPayPalSdk(SDKParams, PartnerAttributionId, ClientToken, SdkToken, PayPal3Dsecure, function (err) { 6296 if (typeof err !== "undefined") { 6297 console.error('Failed to load paypal script') 6298 } else { 6299 define('paypal_sdk', function () { 6300 return paypal; 6301 }) 6302 } 6303 }) 6304});; 6305/* AUTOGENERATED: script.js */ 6306/* vim: set ts=2 sw=2 sts=2 et: */ 6307 6308/** 6309 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 6310 * See https://www.x-cart.com/license-agreement.html for license details. 6311 */ 6312 6313var stickerController = { 6314 config: xcart.getCommentedData(jQuery('body'), 'stickers'), 6315 topStickerQuantity: 2, 6316 bottomStickerQuantity: 4, 6317 productStickerInit: function(base) { 6318 let self = this; 6319 let products = base.hasClass('box-product') ? base : base.find('.box-product, .product-cell'); 6320 6321 products.each(function(){ 6322 let product = $(this); 6323 6324 if ( 6325 product.closest('.product-details').length 6326 && !self.config.show_stickers_on_product_pages 6327 ) { 6328 return; 6329 } 6330 6331 let displayMode = self.config.sticker_display_mode; 6332 let container = $(".product-stickers", product); 6333 6334 self.buildProductStickers(product); 6335 6336 if (displayMode === 'corner_ribbon') { 6337 container.addClass(displayMode + '_mode'); 6338 self.renderTopRibbons(product); 6339 self.renderBottomRibbons(product); 6340 self.postRender(product); 6341 } 6342 6343 container.toggleClass('show'); 6344 }); 6345 }, 6346 buildProductStickers: function(product) { 6347 $(".top-stickers ul", product).append(this.getTopStickers(product)); 6348 $(".bottom-stickers ul", product).append(this.getBottomStickers(product)); 6349 }, 6350 renderTopRibbons: function(product){ 6351 let container = $(".top-stickers ul", product); 6352 let x = container.width(); 6353 let x1 = container.parent().width(); 6354 let y = container.height(); 6355 let y1 = container.parent().height(); 6356 container.css({'left': this.calculateLeftOffset(x, x1), 'top': this.calculateTopOffset(y, y1)}); 6357 container.parent().css({'height': this.calculateContainerHeight(y, y1), 'width': this.calculateContainerWidth(y, x1)}); 6358 }, 6359 postRender: function(product){
6360 let container = $(".bottom-stickers ul", product); 6361 $(container.find('li').get().reverse()).each(function(){ 6362 let textContainer = $(this).find(".text-ribbon > span"); 6363 let productItemOffset = container.closest('.product, .product-details').offset(); 6364 let stickerOffset = textContainer.offset(); 6365 let stickerFullWidth = parseInt($(this).css('width')); 6366 let stickerInitialHeight = parseInt($(this).css('height')); 6367 let textContainerHeight = parseInt(textContainer.css('height')); 6368 let stickerPadding = stickerInitialHeight - textContainerHeight; 6369 let stickerLeftOffset = (productItemOffset.left - stickerOffset.left) * (Math.sqrt(2)); 6370 let stickerCroppedWidth = stickerFullWidth - stickerLeftOffset * 2; 6371 6372 textContainer.css({ 6373 'max-width': stickerCroppedWidth + 'px', 6374 'white-space': 'normal' 6375 }); 6376 6377 let multiplicity = (parseInt($(this).css('height')) - stickerPadding) / (stickerInitialHeight - stickerPadding); 6378 if (multiplicity > 1) { 6379 multiplicity--; 6380 let hypotenuse = multiplicity * textContainerHeight; 6381 let leg = hypotenuse / (Math.sqrt(2)); 6382 let padding = stickerPadding / 2; 6383 container.css({ 6384 'left': parseInt(container.css('left')) - hypotenuse - padding, 6385 'top': parseInt(container.css('top')) + hypotenuse / 2 + padding 6386 }); 6387 container.parent().css({ 6388 'width': parseInt(container.parent().css('width')) + leg * 2 + padding, 6389 'height': parseInt(container.parent().css('height')) + leg * 2 + padding 6390 }); 6391 } 6392 }); 6393 }, 6394 renderBottomRibbons: function(product){ 6395 let container = $(".bottom-stickers ul", product); 6396 let x = container.width(); 6397 let x1 = container.parent().width(); 6398 let y = container.height(); 6399 let y1 = container.parent().height(); 6400 container.css({'left': this.calculateLeftOffset(x, x1)-(this.calculateContainerWidth(y, x1)-x1), 'top': this.calculateTopOffset(y, y1)+(this.calculateContainerHeight(y, y1)-y1)}); 6401 container.parent().css({'height': this.calculateContainerHeight(y, y1), 'width': this.calculateContainerWidth(y, x1)}); 6402 }, 6403 getDefaultStickerBase: function(product) { 6404 const elem = product.get(0); 6405 6406 const findBox = !!elem.querySelector('.image') 6407 ? product 6408 : elem.querySelectorAll('.product-photo'); 6409 6410 return elem 6411 && !!findBox[0].querySelector('ul.labels') 6412 ? findBox[0].querySelector('ul.labels') 6413 : null; 6414 }, 6415 getCustomStickerBase: function(product) { 6416 return product ? product.find('.product-stickers > ul') : null; 6417 }, 6418 getDefaultStickers: function(product) { 6419 let self = this; 6420 let base = this.getDefaultStickerBase(product); 6421 let labels = (base ? $(base).find('li').clone().toArray() : []).concat( 6422 product.find('.product-freeship-label:not(.product-sticker)').clone().addClass('product-sticker').toArray() 6423 ); 6424 6425 if (this.config.move_labels) { 6426 labels = _.each(labels, function (label) { 6427 _.each(self.config.labels, function (relation) { 6428 if ( 6429 $(label).hasClass(relation.name) 6430 || $(label).hasClass('product-freeship-label') && relation.name === 'free-shipping' 6431 ) { 6432 $(label).find(".content").css({ 6433 'background': '#' + relation.bg_color, 6434 'color': '#' + relation.text_color 6435 }); 6436 return $(label); 6437 } 6438 }); 6439 }); 6440 } 6441 6442 return labels; 6443 }, 6444 getCustomStickers: function(product) { 6445 let base = this.getCustomStickerBase(product); 6446 return base ? base.find('li').clone().toArray() : []; 6447 }, 6448 getAllStickers: function(product) { 6449 return this.showLabelsAsStickers() 6450 ? this.getDefaultStickers(product).concat(this.getCustomStickers(product)) 6451 : this.getCustomStickers(product); 6452 }, 6453 getTopStickers: function(product) { 6454 return this.getAllStickers(product).splice(0, this.topStickerQuantity); 6455 }, 6456 getBottomStickers: function(product) { 6457 return this.getAllStickers(product).splice(this.topStickerQuantity, this.bottomStickerQuantity); 6458 }, 6459 calculateLeftOffset: function(x, x1) { 6460 return ((x1-x)/2); 6461 }, 6462 calculateTopOffset: function(y, y1) { 6463 return ((y1-y)/2); 6464 }, 6465 calculateContainerHeight: function(h, h1) { 6466 return (h1 + h/(Math.sqrt(2))); 6467 }, 6468 calculateContainerWidth: function(h, w1) { 6469 return (w1 + h/(Math.sqrt(2))); 6470 }, 6471 isProductPage: function() { 6472 return $("body").hasClass("target-product"); 6473 }, 6474 showLabelsAsStickers: function() { 6475 return this.config.move_labels; 6476 }, 6477 isInitAllowed: function() { 6478 return ( 6479 !this.isProductPage() 6480 || this.config.show_stickers_on_product_pages 6481 || ( 6482 this.showLabelsAsStickers() 6483 && document.getElementsByClassName('items-list-products')?.length 6484 ) 6485 ); 6486 }, 6487} 6488 6489xcart.bind(['list.products.postprocess', 'block.product.details.postprocess'], function(event, data) { 6490 if (stickerController.isInitAllowed()) { 6491 stickerController.productStickerInit(data.widget.base); 6492 $(".box-product .infoBlock .labels, .product-cell .product-photo .labels").show(); 6493 } 6494 if (stickerController.showLabelsAsStickers()) { 6495 $(".box-product .infoBlock .labels, .product-cell .product-photo .labels").hide(); 6496 } 6497});; 6498/* AUTOGENERATED: flyout-menu.js */ 6499/* vim: set ts=2 sw=2 sts=2 et: */ 6500 6501/** 6502 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 6503 * See https://www.x-cart.com/license-agreement.html for license details. 6504 */ 6505 6506jQuery(document).ready(function(){ 6507 jQuery('ul.flyout-menu > li:not(.leaf) > a').on("touchstart", function (e) { 6508 6509 jQuery('ul.flyout-menu').addClass('touch'); 6510 6511 var link = jQuery(this); 6512 var li = jQuery(this).parent(); 6513 if (link.hasClass('hover')) { 6514 li.addClass('hover'); 6515 return true; 6516 } else { 6517 link.addClass('hover'); 6518 jQuery('ul.flyout-menu > li > a').not(this).removeClass('hover'); 6519 6520 li.closest('ul.flyout-menu').find('li').removeClass('hover'); 6521 li.addClass('hover'); 6522 6523 e.preventDefault(); 6524 return false;
6525 } 6526 }); 6527});; 6528/* AUTOGENERATED: vue.min.js */ 6529/*! 6530 * Vue.js v2.6.12 6531 * (c) 2014-2020
vendor: 37,807 bytes, lines 6531-6534
6531 Evan You 6532 * Released under the MIT License. 6533 */ 6534!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Vue=t()}(this,function(){"use strict";var e=Object.freeze({});function t(e){return null==e}function n(e){return null!=e}function r(e){return!0===e}function i(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function o(e){return null!==e&&"object"==typeof e}var a=Object.prototype.toString;function s(e){return"[object Object]"===a.call(e)}function c(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function u(e){return n(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function l(e){return null==e?"":Array.isArray(e)||s(e)&&e.toString===a?JSON.stringify(e,null,2):String(e)}function f(e){var t=parseFloat(e);return isNaN(t)?e:t}function p(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i<r.length;i++)n[r[i]]=!0;return t?function(e){return n[e.toLowerCase()]}:function(e){return n[e]}}var d=p("slot,component",!0),v=p("key,ref,slot,slot-scope,is");function h(e,t){if(e.length){var n=e.indexOf(t);if(n>-1)return e.splice(n,1)}}var m=Object.prototype.hasOwnProperty;function y(e,t){return m.call(e,t)}function g(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var _=/-(\w)/g,b=g(function(e){return e.replace(_,function(e,t){return t?t.toUpperCase():""})}),$=g(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}),w=/\B([A-Z])/g,C=g(function(e){return e.replace(w,"-$1").toLowerCase()});var x=Function.prototype.bind?function(e,t){return e.bind(t)}:function(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n};function k(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function A(e,t){for(var n in t)e[n]=t[n];return e}function O(e){for(var t={},n=0;n<e.length;n++)e[n]&&A(t,e[n]);return t}function S(e,t,n){}var T=function(e,t,n){return!1},E=function(e){return e};function N(e,t){if(e===t)return!0;var n=o(e),r=o(t);if(!n||!r)return!n&&!r&&String(e)===String(t);try{var i=Array.isArray(e),a=Array.isArray(t);if(i&&a)return e.length===t.length&&e.every(function(e,n){return N(e,t[n])});if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(i||a)return!1;var s=Object.keys(e),c=Object.keys(t);return s.length===c.length&&s.every(function(n){return N(e[n],t[n])})}catch(e){return!1}}function j(e,t){for(var n=0;n<e.length;n++)if(N(e[n],t))return n;return-1}function D(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}}var L="data-server-rendered",M=["component","directive","filter"],I=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","serverPrefetch"],F={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:T,isReservedAttr:T,isUnknownElement:T,getTagNamespace:S,parsePlatformTagName:E,mustUseProp:T,async:!0,_lifecycleHooks:I},P=/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;function R(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var H=new RegExp("[^"+P.source+".$_\\d]");var B,U="__proto__"in{},z="undefined"!=typeof window,V="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,K=V&&WXEnvironment.platform.toLowerCase(),J=z&&window.navigator.userAgent.toLowerCase(),q=J&&/msie|trident/.test(J),W=J&&J.indexOf("msie 9.0")>0,Z=J&&J.indexOf("edge/")>0,G=(J&&J.indexOf("android"),J&&/iphone|ipad|ipod|ios/.test(J)||"ios"===K),X=(J&&/chrome\/\d+/.test(J),J&&/phantomjs/.test(J),J&&J.match(/firefox\/(\d+)/)),Y={}.watch,Q=!1;if(z)try{var ee={};Object.defineProperty(ee,"passive",{get:function(){Q=!0}}),window.addEventListener("test-passive",null,ee)}catch(e){}var te=function(){return void 0===B&&(B=!z&&!V&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV)),B},ne=z&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function re(e){return"function"==typeof e&&/native code/.test(e.toString())}var ie,oe="undefined"!=typeof Symbol&&re(Symbol)&&"undefined"!=typeof Reflect&&re(Reflect.ownKeys);ie="undefined"!=typeof Set&&re(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var ae=S,se=0,ce=function(){this.id=se++,this.subs=[]};ce.prototype.addSub=function(e){this.subs.push(e)},ce.prototype.removeSub=function(e){h(this.subs,e)},ce.prototype.depend=function(){ce.target&&ce.target.addDep(this)},ce.prototype.notify=function(){for(var e=this.subs.slice(),t=0,n=e.length;t<n;t++)e[t].update()},ce.target=null;var ue=[];function le(e){ue.push(e),ce.target=e}function fe(){ue.pop(),ce.target=ue[ue.length-1]}var pe=function(e,t,n,r,i,o,a,s){this.tag=e,this.data=t,this.children=n,this.text=r,this.elm=i,this.ns=void 0,this.context=o,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=t&&t.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1},de={child:{configurable:!0}};de.child.get=function(){return this.componentInstance},Object.defineProperties(pe.prototype,de);var ve=function(e){void 0===e&&(e="");var t=new pe;return t.text=e,t.isComment=!0,t};function he(e){return new pe(void 0,void 0,void 0,String(e))}function me(e){var t=new pe(e.tag,e.data,e.children&&e.children.slice(),e.text,e.elm,e.context,e.componentOptions,e.asyncFactory);return t.ns=e.ns,t.isStatic=e.isStatic,t.key=e.key,t.isComment=e.isComment,t.fnContext=e.fnContext,t.fnOptions=e.fnOptions,t.fnScopeId=e.fnScopeId,t.asyncMeta=e.asyncMeta,t.isCloned=!0,t}var ye=Array.prototype,ge=Object.create(ye);["push","pop","shift","unshift","splice","sort","reverse"].forEach(function(e){var t=ye[e];R(ge,e,function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];var i,o=t.apply(this,n),a=this.__ob__;switch(e){case"push":case"unshift":i=n;break;case"splice":i=n.slice(2)}return i&&a.observeArray(i),a.dep.notify(),o})});var _e=Object.getOwnPropertyNames(ge),be=!0;function $e(e){be=e}var we=function(e){var t;this.value=e,this.dep=new ce,this.vmCount=0,R(e,"__ob__",this),Array.isArray(e)?(U?(t=ge,e.__proto__=t):function(e,t,n){for(var r=0,i=n.length;r<i;r++){var o=n[r];R(e,o,t[o])}}(e,ge,_e),this.observeArray(e)):this.walk(e)};function Ce(e,t){var n;if(o(e)&&!(e instanceof pe))return y(e,"__ob__")&&e.__ob__ instanceof we?n=e.__ob__:be&&!te()&&(Array.isArray(e)||s(e))&&Object.isExtensible(e)&&!e._isVue&&(n=new we(e)),t&&n&&n.vmCount++,n}function xe(e,t,n,r,i){var o=new ce,a=Object.getOwnPropertyDescriptor(e,t);if(!a||!1!==a.configurable){var s=a&&a.get,c=a&&a.set;s&&!c||2!==arguments.length||(n=e[t]);var u=!i&&Ce(n);Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){var t=s?s.call(e):n;return ce.target&&(o.depend(),u&&(u.dep.depend(),Array.isArray(t)&&function e(t){for(var n=void 0,r=0,i=t.length;r<i;r++)(n=t[r])&&n.__ob__&&n.__ob__.dep.depend(),Array.isArray(n)&&e(n)}(t))),t},set:function(t){var r=s?s.call(e):n;t===r||t!=t&&r!=r||s&&!c||(c?c.call(e,t):n=t,u=!i&&Ce(t),o.notify())}})}}function ke(e,t,n){if(Array.isArray(e)&&c(t))return e.length=Math.max(e.length,t),e.splice(t,1,n),n;if(t in e&&!(t in Object.prototype))return e[t]=n,n;var r=e.__ob__;return e._isVue||r&&r.vmCount?n:r?(xe(r.value,t,n),r.dep.notify(),n):(e[t]=n,n)}function Ae(e,t){if(Array.isArray(e)&&c(t))e.splice(t,1);else{var n=e.__ob__;e._isVue||n&&n.vmCount||y(e,t)&&(delete e[t],n&&n.dep.notify())}}we.prototype.walk=function(e){for(var t=Object.keys(e),n=0;n<t.length;n++)xe(e,t[n])},we.prototype.observeArray=function(e){for(var t=0,n=e.length;t<n;t++)Ce(e[t])};var Oe=F.optionMergeStrategies;function Se(e,t){if(!t)return e;for(var n,r,i,o=oe?Reflect.ownKeys(t):Object.keys(t),a=0;a<o.length;a++)"__ob__"!==(n=o[a])&&(r=e[n],i=t[n],y(e,n)?r!==i&&s(r)&&s(i)&&Se(r,i):ke(e,n,i));return e}function Te(e,t,n){return n?function(){var r="function"==typeof t?t.call(n,n):t,i="function"==typeof e?e.call(n,n):e;return r?Se(r,i):i}:t?e?function(){return Se("function"==typeof t?t.call(this,this):t,"function"==typeof e?e.call(this,this):e)}:t:e}function Ee(e,t){var n=t?e?e.concat(t):Array.isArray(t)?t:[t]:e;return n?function(e){for(var t=[],n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t}(n):n}function Ne(e,t,n,r){var i=Object.create(e||null);return t?A(i,t):i}Oe.data=function(e,t,n){return n?Te(e,t,n):t&&"function"!=typeof t?e:Te(e,t)},I.forEach(function(e){Oe[e]=Ee}),M.forEach(function(e){Oe[e+"s"]=Ne}),Oe.watch=function(e,t,n,r){if(e===Y&&(e=void 0),t===Y&&(t=void 0),!t)return Object.create(e||null);if(!e)return t;var i={};for(var o in A(i,e),t){var a=i[o],s=t[o];a&&!Array.isArray(a)&&(a=[a]),i[o]=a?a.concat(s):Array.isArray(s)?s:[s]}return i},Oe.props=Oe.methods=Oe.inject=Oe.computed=function(e,t,n,r){if(!e)return t;var i=Object.create(null);return A(i,e),t&&A(i,t),i},Oe.provide=Te;var je=function(e,t){return void 0===t?e:t};function De(e,t,n){if("function"==typeof t&&(t=t.options),function(e,t){var n=e.props;if(n){var r,i,o={};if(Array.isArray(n))for(r=n.length;r--;)"string"==typeof(i=n[r])&&(o[b(i)]={type:null});else if(s(n))for(var a in n)i=n[a],o[b(a)]=s(i)?i:{type:i};e.props=o}}(t),function(e,t){var n=e.inject;if(n){var r=e.inject={};if(Array.isArray(n))for(var i=0;i<n.length;i++)r[n[i]]={from:n[i]};else if(s(n))for(var o in n){var a=n[o];r[o]=s(a)?A({from:o},a):{from:a}}}}(t),function(e){var t=e.directives;if(t)for(var n in t){var r=t[n];"function"==typeof r&&(t[n]={bind:r,update:r})}}(t),!t._base&&(t.extends&&(e=De(e,t.extends,n)),t.mixins))for(var r=0,i=t.mixins.length;r<i;r++)e=De(e,t.mixins[r],n);var o,a={};for(o in e)c(o);for(o in t)y(e,o)||c(o);function c(r){var i=Oe[r]||je;a[r]=i(e[r],t[r],n,r)}return a}function Le(e,t,n,r){if("string"==typeof n){var i=e[t];if(y(i,n))return i[n];var o=b(n);if(y(i,o))return i[o];var a=$(o);return y(i,a)?i[a]:i[n]||i[o]||i[a]}}function Me(e,t,n,r){var i=t[e],o=!y(n,e),a=n[e],s=Pe(Boolean,i.type);if(s>-1)if(o&&!y(i,"default"))a=!1;else if(""===a||a===C(e)){var c=Pe(String,i.type);(c<0||s<c)&&(a=!0)}if(void 0===a){a=function(e,t,n){if(!y(t,"default"))return;var r=t.default;if(e&&e.$options.propsData&&void 0===e.$options.propsData[n]&&void 0!==e._props[n])return e._props[n];return"function"==typeof r&&"Function"!==Ie(t.type)?r.call(e):r}(r,i,e);var u=be;$e(!0),Ce(a),$e(u)}return a}function Ie(e){var t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:""}function Fe(e,t){return Ie(e)===Ie(t)}function Pe(e,t){if(!Array.isArray(t))return Fe(t,e)?0:-1;for(var n=0,r=t.length;n<r;n++)if(Fe(t[n],e))return n;return-1}function Re(e,t,n){le();try{if(t)for(var r=t;r=r.$parent;){var i=r.$options.errorCaptured;if(i)for(var o=0;o<i.length;o++)try{if(!1===i[o].call(r,e,t,n))return}catch(e){Be(e,r,"errorCaptured hook")}}Be(e,t,n)}finally{fe()}}function He(e,t,n,r,i){var o;try{(o=n?e.apply(t,n):e.call(t))&&!o._isVue&&u(o)&&!o._handled&&(o.catch(function(e){return Re(e,r,i+" (Promise/async)")}),o._handled=!0)}catch(e){Re(e,r,i)}return o}function Be(e,t,n){if(F.errorHandler)try{return F.errorHandler.call(null,e,t,n)}catch(t){t!==e&&Ue(t,null,"config.errorHandler")}Ue(e,t,n)}function Ue(e,t,n){if(!z&&!V||"undefined"==typeof console)throw e;console.error(e)}var ze,Ve=!1,Ke=[],Je=!1;function qe(){Je=!1;var e=Ke.slice(0);Ke.length=0;for(var t=0;t<e.length;t++)e[t]()}if("undefined"!=typeof Promise&&re(Promise)){var We=Promise.resolve();ze=function(){We.then(qe),G&&setTimeout(S)},Ve=!0}else if(q||"undefined"==typeof MutationObserver||!re(MutationObserver)&&"[object MutationObserverConstructor]"!==MutationObserver.toString())ze="undefined"!=typeof setImmediate&&re(setImmediate)?function(){setImmediate(qe)}:function(){setTimeout(qe,0)};else{var Ze=1,Ge=new MutationObserver(qe),Xe=document.createTextNode(String(Ze));Ge.observe(Xe,{characterData:!0}),ze=function(){Ze=(Ze+1)%2,Xe.data=String(Ze)},Ve=!0}function Ye(e,t){var n;if(Ke.push(function(){if(e)try{e.call(t)}catch(e){Re(e,t,"nextTick")}else n&&n(t)}),Je||(Je=!0,ze()),!e&&"undefined"!=typeof Promise)return new Promise(function(e){n=e})}var Qe=new ie;function et(e){!function e(t,n){var r,i;var a=Array.isArray(t);if(!a&&!o(t)||Object.isFrozen(t)||t instanceof pe)return;if(t.__ob__){var s=t.__ob__.dep.id;if(n.has(s))return;n.add(s)}if(a)for(r=t.length;r--;)e(t[r],n);else for(i=Object.keys(t),r=i.length;r--;)e(t[i[r]],n)}(e,Qe),Qe.clear()}var tt=g(function(e){var t="&"===e.charAt(0),n="~"===(e=t?e.slice(1):e).charAt(0),r="!"===(e=n?e.slice(1):e).charAt(0);return{name:e=r?e.slice(1):e,once:n,capture:r,passive:t}});function nt(e,t){function n(){var e=arguments,r=n.fns;if(!Array.isArray(r))return He(r,null,arguments,t,"v-on handler");for(var i=r.slice(),o=0;o<i.length;o++)He(i[o],null,e,t,"v-on handler")}return n.fns=e,n}function rt(e,n,i,o,a,s){var c,u,l,f;for(c in e)u=e[c],l=n[c],f=tt(c),t(u)||(t(l)?(t(u.fns)&&(u=e[c]=nt(u,s)),r(f.once)&&(u=e[c]=a(f.name,u,f.capture)),i(f.name,u,f.capture,f.passive,f.params)):u!==l&&(l.fns=u,e[c]=l));for(c in n)t(e[c])&&o((f=tt(c)).name,n[c],f.capture)}function it(e,i,o){var a;e instanceof pe&&(e=e.data.hook||(e.data.hook={}));var s=e[i];function c(){o.apply(this,arguments),h(a.fns,c)}t(s)?a=nt([c]):n(s.fns)&&r(s.merged)?(a=s).fns.push(c):a=nt([s,c]),a.merged=!0,e[i]=a}function ot(e,t,r,i,o){if(n(t)){if(y(t,r))return e[r]=t[r],o||delete t[r],!0;if(y(t,i))return e[r]=t[i],o||delete t[i],!0}return!1}function at(e){return i(e)?[he(e)]:Array.isArray(e)?function e(o,a){var s=[];var c,u,l,f;for(c=0;c<o.length;c++)t(u=o[c])||"boolean"==typeof u||(l=s.length-1,f=s[l],Array.isArray(u)?u.length>0&&(st((u=e(u,(a||"")+"_"+c))[0])&&st(f)&&(s[l]=he(f.text+u[0].text),u.shift()),s.push.apply(s,u)):i(u)?st(f)?s[l]=he(f.text+u):""!==u&&s.push(he(u)):st(u)&&st(f)?s[l]=he(f.text+u.text):(r(o._isVList)&&n(u.tag)&&t(u.key)&&n(a)&&(u.key="__vlist"+a+"_"+c+"__"),s.push(u)));return s}(e):void 0}function st(e){return n(e)&&n(e.text)&&!1===e.isComment}function ct(e,t){if(e){for(var n=Object.create(null),r=oe?Reflect.ownKeys(e):Object.keys(e),i=0;i<r.length;i++){var o=r[i];if("__ob__"!==o){for(var a=e[o].from,s=t;s;){if(s._provided&&y(s._provided,a)){n[o]=s._provided[a];break}s=s.$parent}if(!s&&"default"in e[o]){var c=e[o].default;n[o]="function"==typeof c?c.call(t):c}}}return n}}function ut(e,t){if(!e||!e.length)return{};for(var n={},r=0,i=e.length;r<i;r++){var o=e[r],a=o.data;if(a&&a.attrs&&a.attrs.slot&&delete a.attrs.slot,o.context!==t&&o.fnContext!==t||!a||null==a.slot)(n.default||(n.default=[])).push(o);else{var s=a.slot,c=n[s]||(n[s]=[]);"template"===o.tag?c.push.apply(c,o.children||[]):c.push(o)}}for(var u in n)n[u].every(lt)&&delete n[u];return n}function lt(e){return e.isComment&&!e.asyncFactory||" "===e.text}function ft(t,n,r){var i,o=Object.keys(n).length>0,a=t?!!t.$stable:!o,s=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(a&&r&&r!==e&&s===r.$key&&!o&&!r.$hasNormal)return r;for(var c in i={},t)t[c]&&"$"!==c[0]&&(i[c]=pt(n,c,t[c]))}else i={};for(var u in n)u in i||(i[u]=dt(n,u));return t&&Object.isExtensible(t)&&(t._normalized=i),R(i,"$stable",a),R(i,"$key",s),R(i,"$hasNormal",o),i}function pt(e,t,n){var r=function(){var e=arguments.length?n.apply(null,arguments):n({});return(e=e&&"object"==typeof e&&!Array.isArray(e)?[e]:at(e))&&(0===e.length||1===e.length&&e[0].isComment)?void 0:e};return n.proxy&&Object.defineProperty(e,t,{get:r,enumerable:!0,configurable:!0}),r}function dt(e,t){return function(){return e[t]}}function vt(e,t){var r,i,a,s,c;if(Array.isArray(e)||"string"==typeof e)for(r=new Array(e.length),i=0,a=e.length;i<a;i++)r[i]=t(e[i],i);else if("number"==typeof e)for(r=new Array(e),i=0;i<e;i++)r[i]=t(i+1,i);else if(o(e))if(oe&&e[Symbol.iterator]){r=[];for(var u=e[Symbol.iterator](),l=u.next();!l.done;)r.push(t(l.value,r.length)),l=u.next()}else for(s=Object.keys(e),r=new Array(s.length),i=0,a=s.length;i<a;i++)c=s[i],r[i]=t(e[c],c,i);return n(r)||(r=[]),r._isVList=!0,r}function ht(e,t,n,r){var i,o=this.$scopedSlots[e];o?(n=n||{},r&&(n=A(A({},r),n)),i=o(n)||t):i=this.$slots[e]||t;var a=n&&n.slot;return a?this.$createElement("template",{slot:a},i):i}function mt(e){return Le(this.$options,"filters",e)||E}function yt(e,t){return Array.isArray(e)?-1===e.indexOf(t):e!==t}function gt(e,t,n,r,i){var o=F.keyCodes[t]||n;return i&&r&&!F.keyCodes[t]?yt(i,r):o?yt(o,e):r?C(r)!==t:void 0}function _t(e,t,n,r,i){if(n)if(o(n)){var a;Array.isArray(n)&&(n=O(n));var s=function(o){if("class"===o||"style"===o||v(o))a=e;else{var s=e.attrs&&e.attrs.type;a=r||F.mustUseProp(t,s,o)?e.domProps||(e.domProps={}):e.attrs||(e.attrs={})}var c=b(o),u=C(o);c in a||u in a||(a[o]=n[o],i&&((e.on||(e.on={}))["update:"+o]=function(e){n[o]=e}))};for(var c in n)s(c)}else;return e}function bt(e,t){var n=this._staticTrees||(this._staticTrees=[]),r=n[e];return r&&!t?r:(wt(r=n[e]=this.$options.staticRenderFns[e].call(this._renderProxy,null,this),"__static__"+e,!1),r)}function $t(e,t,n){return wt(e,"__once__"+t+(n?"_"+n:""),!0),e}function wt(e,t,n){if(Array.isArray(e))for(var r=0;r<e.length;r++)e[r]&&"string"!=typeof e[r]&&Ct(e[r],t+"_"+r,n);else Ct(e,t,n)}function Ct(e,t,n){e.isStatic=!0,e.key=t,e.isOnce=n}function xt(e,t){if(t)if(s(t)){var n=e.on=e.on?A({},e.on):{};for(var r in t){var i=n[r],o=t[r];n[r]=i?[].concat(i,o):o}}else;return e}function kt(e,t,n,r){t=t||{$stable:!n};for(var i=0;i<e.length;i++){var o=e[i];Array.isArray(o)?kt(o,t,n):o&&(o.proxy&&(o.fn.proxy=!0),t[o.key]=o.fn)}return r&&(t.$key=r),t}function At(e,t){for(var n=0;n<t.length;n+=2){var r=t[n];"string"==typeof r&&r&&(e[t[n]]=t[n+1])}return e}function Ot(e,t){return"string"==typeof e?t+e:e}function St(e){e._o=$t,e._n=f,e._s=l,e._l=vt,e._t=ht,e._q=N,e._i=j,e._m=bt,e._f=mt,e._k=gt,e._b=_t,e._v=he,e._e=ve,e._u=kt,e._g=xt,e._d=At,e._p=Ot}function Tt(t,n,i,o,a){var s,c=this,u=a.options;y(o,"_uid")?(s=Object.create(o))._original=o:(s=o,o=o._original);var l=r(u._compiled),f=!l;this.data=t,this.props=n,this.children=i,this.parent=o,this.listeners=t.on||e,this.injections=ct(u.inject,o),this.slots=function(){return c.$slots||ft(t.scopedSlots,c.$slots=ut(i,o)),c.$slots},Object.defineProperty(this,"scopedSlots",{enumerable:!0,get:function(){return ft(t.scopedSlots,this.slots())}}),l&&(this.$options=u,this.$slots=this.slots(),this.$scopedSlots=ft(t.scopedSlots,this.$slots)),u._scopeId?this._c=function(e,t,n,r){var i=Pt(s,e,t,n,r,f);return i&&!Array.isArray(i)&&(i.fnScopeId=u._scopeId,i.fnContext=o),i}:this._c=function(e,t,n,r){return Pt(s,e,t,n,r,f)}}function Et(e,t,n,r,i){var o=me(e);return o.fnContext=n,o.fnOptions=r,t.slot&&((o.data||(o.data={})).slot=t.slot),o}function Nt(e,t){for(var n in t)e[b(n)]=t[n]}St(Tt.prototype);var jt={init:function(e,t){if(e.componentInstance&&!e.componentInstance._isDestroyed&&e.data.keepAlive){var r=e;jt.prepatch(r,r)}else{(e.componentInstance=function(e,t){var r={_isComponent:!0,_parentVnode:e,parent:t},i=e.data.inlineTemplate;n(i)&&(r.render=i.render,r.staticRenderFns=i.staticRenderFns);return new e.componentOptions.Ctor(r)}(e,Wt)).$mount(t?e.elm:void 0,t)}},prepatch:function(t,n){var r=n.componentOptions;!function(t,n,r,i,o){var a=i.data.scopedSlots,s=t.$scopedSlots,c=!!(a&&!a.$stable||s!==e&&!s.$stable||a&&t.$scopedSlots.$key!==a.$key),u=!!(o||t.$options._renderChildren||c);t.$options._parentVnode=i,t.$vnode=i,t._vnode&&(t._vnode.parent=i);if(t.$options._renderChildren=o,t.$attrs=i.data.attrs||e,t.$listeners=r||e,n&&t.$options.props){$e(!1);for(var l=t._props,f=t.$options._propKeys||[],p=0;p<f.length;p++){var d=f[p],v=t.$options.props;l[d]=Me(d,v,n,t)}$e(!0),t.$options.propsData=n}r=r||e;var h=t.$options._parentListeners;t.$options._parentListeners=r,qt(t,r,h),u&&(t.$slots=ut(o,i.context),t.$forceUpdate())}(n.componentInstance=t.componentInstance,r.propsData,r.listeners,n,r.children)},insert:function(e){var t,n=e.context,r=e.componentInstance;r._isMounted||(r._isMounted=!0,Yt(r,"mounted")),e.data.keepAlive&&(n._isMounted?((t=r)._inactive=!1,en.push(t)):Xt(r,!0))},destroy:function(e){var t=e.componentInstance;t._isDestroyed||(e.data.keepAlive?function e(t,n){if(n&&(t._directInactive=!0,Gt(t)))return;if(!t._inactive){t._inactive=!0;for(var r=0;r<t.$children.length;r++)e(t.$children[r]);Yt(t,"deactivated")}}(t,!0):t.$destroy())}},Dt=Object.keys(jt);function Lt(i,a,s,c,l){if(!t(i)){var f=s.$options._base;if(o(i)&&(i=f.extend(i)),"function"==typeof i){var p;if(t(i.cid)&&void 0===(i=function(e,i){if(r(e.error)&&n(e.errorComp))return e.errorComp;if(n(e.resolved))return e.resolved;var a=Ht;a&&n(e.owners)&&-1===e.owners.indexOf(a)&&e.owners.push(a);if(r(e.loading)&&n(e.loadingComp))return e.loadingComp;if(a&&!n(e.owners)){var s=e.owners=[a],c=!0,l=null,f=null;a.$on("hook:destroyed",function(){return h(s,a)});var p=function(e){for(var t=0,n=s.length;t<n;t++)s[t].$forceUpdate();e&&(s.length=0,null!==l&&(clearTimeout(l),l=null),null!==f&&(clearTimeout(f),f=null))},d=D(function(t){e.resolved=Bt(t,i),c?s.length=0:p(!0)}),v=D(function(t){n(e.errorComp)&&(e.error=!0,p(!0))}),m=e(d,v);return o(m)&&(u(m)?t(e.resolved)&&m.then(d,v):u(m.component)&&(m.component.then(d,v),n(m.error)&&(e.errorComp=Bt(m.error,i)),n(m.loading)&&(e.loadingComp=Bt(m.loading,i),0===m.delay?e.loading=!0:l=setTimeout(function(){l=null,t(e.resolved)&&t(e.error)&&(e.loading=!0,p(!1))},m.delay||200)),n(m.timeout)&&(f=setTimeout(function(){f=null,t(e.resolved)&&v(null)},m.timeout)))),c=!1,e.loading?e.loadingComp:e.resolved}}(p=i,f)))return function(e,t,n,r,i){var o=ve();return o.asyncFactory=e,o.asyncMeta={data:t,context:n,children:r,tag:i},o}(p,a,s,c,l);a=a||{},$n(i),n(a.model)&&function(e,t){var r=e.model&&e.model.prop||"value",i=e.model&&e.model.event||"input";(t.attrs||(t.attrs={}))[r]=t.model.value;var o=t.on||(t.on={}),a=o[i],s=t.model.callback;n(a)?(Array.isArray(a)?-1===a.indexOf(s):a!==s)&&(o[i]=[s].concat(a)):o[i]=s}(i.options,a);var d=function(e,r,i){var o=r.options.props;if(!t(o)){var a={},s=e.attrs,c=e.props;if(n(s)||n(c))for(var u in o){var l=C(u);ot(a,c,u,l,!0)||ot(a,s,u,l,!1)}return a}}(a,i);if(r(i.options.functional))return function(t,r,i,o,a){var s=t.options,c={},u=s.props;if(n(u))for(var l in u)c[l]=Me(l,u,r||e);else n(i.attrs)&&Nt(c,i.attrs),n(i.props)&&Nt(c,i.props);var f=new Tt(i,c,a,o,t),p=s.render.call(null,f._c,f);if(p instanceof pe)return Et(p,i,f.parent,s);if(Array.isArray(p)){for(var d=at(p)||[],v=new Array(d.length),h=0;h<d.length;h++)v[h]=Et(d[h],i,f.parent,s);return v}}(i,d,a,s,c);var v=a.on;if(a.on=a.nativeOn,r(i.options.abstract)){var m=a.slot;a={},m&&(a.slot=m)}!function(e){for(var t=e.hook||(e.hook={}),n=0;n<Dt.length;n++){var r=Dt[n],i=t[r],o=jt[r];i===o||i&&i._merged||(t[r]=i?Mt(o,i):o)}}(a);var y=i.options.name||l;return new pe("vue-component-"+i.cid+(y?"-"+y:""),a,void 0,void 0,void 0,s,{Ctor:i,propsData:d,listeners:v,tag:l,children:c},p)}}}function Mt(e,t){var n=function(n,r){e(n,r),t(n,r)};return n._merged=!0,n}var It=1,Ft=2;function Pt(e,a,s,c,u,l){return(Array.isArray(s)||i(s))&&(u=c,c=s,s=void 0),r(l)&&(u=Ft),function(e,i,a,s,c){if(n(a)&&n(a.__ob__))return ve();n(a)&&n(a.is)&&(i=a.is);if(!i)return ve();Array.isArray(s)&&"function"==typeof s[0]&&((a=a||{}).scopedSlots={default:s[0]},s.length=0);c===Ft?s=at(s):c===It&&(s=function(e){for(var t=0;t<e.length;t++)if(Array.isArray(e[t]))return Array.prototype.concat.apply([],e);return e}(s));var u,l;if("string"==typeof i){var f;l=e.$vnode&&e.$vnode.ns||F.getTagNamespace(i),u=F.isReservedTag(i)?new pe(F.parsePlatformTagName(i),a,s,void 0,void 0,e):a&&a.pre||!n(f=Le(e.$options,"components",i))?new pe(i,a,s,void 0,void 0,e):Lt(f,a,e,s,i)}else u=Lt(i,a,e,s);return Array.isArray(u)?u:n(u)?(n(l)&&function e(i,o,a){i.ns=o;"foreignObject"===i.tag&&(o=void 0,a=!0);if(n(i.children))for(var s=0,c=i.children.length;s<c;s++){var u=i.children[s];n(u.tag)&&(t(u.ns)||r(a)&&"svg"!==u.tag)&&e(u,o,a)}}(u,l),n(a)&&function(e){o(e.style)&&et(e.style);o(e.class)&&et(e.class)}(a),u):ve()}(e,a,s,c,u)}var Rt,Ht=null;function Bt(e,t){return(e.__esModule||oe&&"Module"===e[Symbol.toStringTag])&&(e=e.default),o(e)?t.extend(e):e}function Ut(e){return e.isComment&&e.asyncFactory}function zt(e){if(Array.isArray(e))for(var t=0;t<e.length;t++){var r=e[t];if(n(r)&&(n(r.componentOptions)||Ut(r)))return r}}function Vt(e,t){Rt.$on(e,t)}function Kt(e,t){Rt.$off(e,t)}function Jt(e,t){var n=Rt;return function r(){null!==t.apply(null,arguments)&&n.$off(e,r)}}function qt(e,t,n){Rt=e,rt(t,n||{},Vt,Kt,Jt,e),Rt=void 0}var Wt=null;function Zt(e){var t=Wt;return Wt=e,function(){Wt=t}}function Gt(e){for(;e&&(e=e.$parent);)if(e._inactive)return!0;return!1}function Xt(e,t){if(t){if(e._directInactive=!1,Gt(e))return}else if(e._directInactive)return;if(e._inactive||null===e._inactive){e._inactive=!1;for(var n=0;n<e.$children.length;n++)Xt(e.$children[n]);Yt(e,"activated")}}function Yt(e,t){le();var n=e.$options[t],r=t+" hook";if(n)for(var i=0,o=n.length;i<o;i++)He(n[i],e,null,e,r);e._hasHookEvent&&e.$emit("hook:"+t),fe()}var Qt=[],en=[],tn={},nn=!1,rn=!1,on=0;var an=0,sn=Date.now;if(z&&!q){var cn=window.performance;cn&&"function"==typeof cn.now&&sn()>document.createEvent("Event").timeStamp&&(sn=function(){return cn.now()})}function un(){var e,t;for(an=sn(),rn=!0,Qt.sort(function(e,t){return e.id-t.id}),on=0;on<Qt.length;on++)(e=Qt[on]).before&&e.before(),t=e.id,tn[t]=null,e.run();var n=en.slice(),r=Qt.slice();on=Qt.length=en.length=0,tn={},nn=rn=!1,function(e){for(var t=0;t<e.length;t++)e[t]._inactive=!0,Xt(e[t],!0)}(n),function(e){var t=e.length;for(;t--;){var n=e[t],r=n.vm;r._watcher===n&&r._isMounted&&!r._isDestroyed&&Yt(r,"updated")}}(r),ne&&F.devtools&&ne.emit("flush")}var ln=0,fn=function(e,t,n,r,i){this.vm=e,i&&(e._watcher=this),e._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++ln,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new ie,this.newDepIds=new ie,this.expression="","function"==typeof t?this.getter=t:(this.getter=function(e){if(!H.test(e)){var t=e.split(".");return function(e){for(var n=0;n<t.length;n++){if(!e)return;e=e[t[n]]}return e}}}(t),this.getter||(this.getter=S)),this.value=this.lazy?void 0:this.get()};fn.prototype.get=function(){var e;le(this);var t=this.vm;try{e=this.getter.call(t,t)}catch(e){if(!this.user)throw e;Re(e,t,'getter for watcher "'+this.expression+'"')}finally{this.deep&&et(e),fe(),this.cleanupDeps()}return e},fn.prototype.addDep=function(e){var t=e.id;this.newDepIds.has(t)||(this.newDepIds.add(t),this.newDeps.push(e),this.depIds.has(t)||e.addSub(this))},fn.prototype.cleanupDeps=function(){for(var e=this.deps.length;e--;){var t=this.deps[e];this.newDepIds.has(t.id)||t.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},fn.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():function(e){var t=e.id;if(null==tn[t]){if(tn[t]=!0,rn){for(var n=Qt.length-1;n>on&&Qt[n].id>e.id;)n--;Qt.splice(n+1,0,e)}else Qt.push(e);nn||(nn=!0,Ye(un))}}(this)},fn.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||o(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){Re(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},fn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},fn.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},fn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||h(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}};var pn={enumerable:!0,configurable:!0,get:S,set:S};function dn(e,t,n){pn.get=function(){return this[t][n]},pn.set=function(e){this[t][n]=e},Object.defineProperty(e,n,pn)}function vn(e){e._watchers=[];var t=e.$options;t.props&&function(e,t){var n=e.$options.propsData||{},r=e._props={},i=e.$options._propKeys=[];e.$parent&&$e(!1);var o=function(o){i.push(o);var a=Me(o,t,n,e);xe(r,o,a),o in e||dn(e,"_props",o)};for(var a in t)o(a);$e(!0)}(e,t.props),t.methods&&function(e,t){e.$options.props;for(var n in t)e[n]="function"!=typeof t[n]?S:x(t[n],e)}(e,t.methods),t.data?function(e){var t=e.$options.data;s(t=e._data="function"==typeof t?function(e,t){le();try{return e.call(t,t)}catch(e){return Re(e,t,"data()"),{}}finally{fe()}}(t,e):t||{})||(t={});var n=Object.keys(t),r=e.$options.props,i=(e.$options.methods,n.length);for(;i--;){var o=n[i];r&&y(r,o)||(a=void 0,36!==(a=(o+"").charCodeAt(0))&&95!==a&&dn(e,"_data",o))}var a;Ce(t,!0)}(e):Ce(e._data={},!0),t.computed&&function(e,t){var n=e._computedWatchers=Object.create(null),r=te();for(var i in t){var o=t[i],a="function"==typeof o?o:o.get;r||(n[i]=new fn(e,a||S,S,hn)),i in e||mn(e,i,o)}}(e,t.computed),t.watch&&t.watch!==Y&&function(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;i<r.length;i++)_n(e,n,r[i]);else _n(e,n,r)}}(e,t.watch)}var hn={lazy:!0};function mn(e,t,n){var r=!te();"function"==typeof n?(pn.get=r?yn(t):gn(n),pn.set=S):(pn.get=n.get?r&&!1!==n.cache?yn(t):gn(n.get):S,pn.set=n.set||S),Object.defineProperty(e,t,pn)}function yn(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),ce.target&&t.depend(),t.value}}function gn(e){return function(){return e.call(this,this)}}function _n(e,t,n,r){return s(n)&&(r=n,n=n.handler),"string"==typeof n&&(n=e[n]),e.$watch(t,n,r)}var bn=0;function $n(e){var t=e.options;if(e.super){var n=$n(e.super);if(n!==e.superOptions){e.superOptions=n;var r=function(e){var t,n=e.options,r=e.sealedOptions;for(var i in n)n[i]!==r[i]&&(t||(t={}),t[i]=n[i]);return t}(e);r&&A(e.extendOptions,r),(t=e.options=De(n,e.extendOptions)).name&&(t.components[t.name]=e)}}return t}function wn(e){this._init(e)}function Cn(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,i=e._Ctor||(e._Ctor={});if(i[r])return i[r];var o=e.name||n.options.name,a=function(e){this._init(e)};return(a.prototype=Object.create(n.prototype)).constructor=a,a.cid=t++,a.options=De(n.options,e),a.super=n,a.options.props&&function(e){var t=e.options.props;for(var n in t)dn(e.prototype,"_props",n)}(a),a.options.computed&&function(e){var t=e.options.computed;for(var n in t)mn(e.prototype,n,t[n])}(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,M.forEach(function(e){a[e]=n[e]}),o&&(a.options.components[o]=a),a.superOptions=n.options,a.extendOptions=e,a.sealedOptions=A({},a.options),i[r]=a,a}}function xn(e){return e&&(e.Ctor.options.name||e.tag)}function kn(e,t){return Array.isArray(e)?e.indexOf(t)>-1:"string"==typeof e?e.split(",").indexOf(t)>-1:(n=e,"[object RegExp]"===a.call(n)&&e.test(t));var n}function An(e,t){var n=e.cache,r=e.keys,i=e._vnode;for(var o in n){var a=n[o];if(a){var s=xn(a.componentOptions);s&&!t(s)&&On(n,o,r,i)}}}function On(e,t,n,r){var i=e[t];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),e[t]=null,h(n,t)}!function(t){t.prototype._init=function(t){var n=this;n._uid=bn++,n._isVue=!0,t&&t._isComponent?function(e,t){var n=e.$options=Object.create(e.constructor.options),r=t._parentVnode;n.parent=t.parent,n._parentVnode=r;var i=r.componentOptions;n.propsData=i.propsData,n._parentListeners=i.listeners,n._renderChildren=i.children,n._componentTag=i.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}(n,t):n.$options=De($n(n.constructor),t||{},n),n._renderProxy=n,n._self=n,function(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}(n),function(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&qt(e,t)}(n),function(t){t._vnode=null,t._staticTrees=null;var n=t.$options,r=t.$vnode=n._parentVnode,i=r&&r.context;t.$slots=ut(n._renderChildren,i),t.$scopedSlots=e,t._c=function(e,n,r,i){return Pt(t,e,n,r,i,!1)},t.$createElement=function(e,n,r,i){return Pt(t,e,n,r,i,!0)};var o=r&&r.data;xe(t,"$attrs",o&&o.attrs||e,null,!0),xe(t,"$listeners",n._parentListeners||e,null,!0)}(n),Yt(n,"beforeCreate"),function(e){var t=ct(e.$options.inject,e);t&&($e(!1),Object.keys(t).forEach(function(n){xe(e,n,t[n])}),$e(!0))}(n),vn(n),function(e){var t=e.$options.provide;t&&(e._provided="function"==typeof t?t.call(e):t)}(n),Yt(n,"created"),n.$options.el&&n.$mount(n.$options.el)}}(wn),function(e){var t={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",n),e.prototype.$set=ke,e.prototype.$delete=Ae,e.prototype.$watch=function(e,t,n){if(s(t))return _n(this,e,t,n);(n=n||{}).user=!0;var r=new fn(this,e,t,n);if(n.immediate)try{t.call(this,r.value)}catch(e){Re(e,this,'callback for immediate watcher "'+r.expression+'"')}return function(){r.teardown()}}}(wn),function(e){var t=/^hook:/;e.prototype.$on=function(e,n){var r=this;if(Array.isArray(e))for(var i=0,o=e.length;i<o;i++)r.$on(e[i],n);else(r._events[e]||(r._events[e]=[])).push(n),t.test(e)&&(r._hasHookEvent=!0);return r},e.prototype.$once=function(e,t){var n=this;function r(){n.$off(e,r),t.apply(n,arguments)}return r.fn=t,n.$on(e,r),n},e.prototype.$off=function(e,t){var n=this;if(!arguments.length)return n._events=Object.create(null),n;if(Array.isArray(e)){for(var r=0,i=e.length;r<i;r++)n.$off(e[r],t);return n}var o,a=n._events[e];if(!a)return n;if(!t)return n._events[e]=null,n;for(var s=a.length;s--;)if((o=a[s])===t||o.fn===t){a.splice(s,1);break}return n},e.prototype.$emit=function(e){var t=this._events[e];if(t){t=t.length>1?k(t):t;for(var n=k(arguments,1),r='event handler for "'+e+'"',i=0,o=t.length;i<o;i++)He(t[i],this,n,this,r)}return this}}(wn),function(e){e.prototype._update=function(e,t){var n=this,r=n.$el,i=n._vnode,o=Zt(n);n._vnode=e,n.$el=i?n.__patch__(i,e):n.__patch__(n.$el,e,t,!1),o(),r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n),n.$vnode&&n.$parent&&n.$vnode===n.$parent._vnode&&(n.$parent.$el=n.$el)},e.prototype.$forceUpdate=function(){this._watcher&&this._watcher.update()},e.prototype.$destroy=function(){var e=this;if(!e._isBeingDestroyed){Yt(e,"beforeDestroy"),e._isBeingDestroyed=!0;var t=e.$parent;!t||t._isBeingDestroyed||e.$options.abstract||h(t.$children,e),e._watcher&&e._watcher.teardown();for(var n=e._watchers.length;n--;)e._watchers[n].teardown();e._data.__ob__&&e._data.__ob__.vmCount--,e._isDestroyed=!0,e.__patch__(e._vnode,null),Yt(e,"destroyed"),e.$off(),e.$el&&(e.$el.__vue__=null),e.$vnode&&(e.$vnode.parent=null)}}}(wn),function(e){St(e.prototype),e.prototype.$nextTick=function(e){return Ye(e,this)},e.prototype._render=function(){var e,t=this,n=t.$options,r=n.render,i=n._parentVnode;i&&(t.$scopedSlots=ft(i.data.scopedSlots,t.$slots,t.$scopedSlots)),t.$vnode=i;try{Ht=t,e=r.call(t._renderProxy,t.$createElement)}catch(n){Re(n,t,"render"),e=t._vnode}finally{Ht=null}return Array.isArray(e)&&1===e.length&&(e=e[0]),e instanceof pe||(e=ve()),e.parent=i,e}}(wn);var Sn=[String,RegExp,Array],Tn={KeepAlive:{name:"keep-alive",abstract:!0,props:{include:Sn,exclude:Sn,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var e in this.cache)On(this.cache,e,this.keys)},mounted:function(){var e=this;this.$watch("include",function(t){An(e,function(e){return kn(t,e)})}),this.$watch("exclude",function(t){An(e,function(e){return!kn(t,e)})})},render:function(){var e=this.$slots.default,t=zt(e),n=t&&t.componentOptions;if(n){var r=xn(n),i=this.include,o=this.exclude;if(i&&(!r||!kn(i,r))||o&&r&&kn(o,r))return t;var a=this.cache,s=this.keys,c=null==t.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):t.key;a[c]?(t.componentInstance=a[c].componentInstance,h(s,c),s.push(c)):(a[c]=t,s.push(c),this.max&&s.length>parseInt(this.max)&&On(a,s[0],s,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};!function(e){var t={get:function(){return F}};Object.defineProperty(e,"config",t),e.util={warn:ae,extend:A,mergeOptions:De,defineReactive:xe},e.set=ke,e.delete=Ae,e.nextTick=Ye,e.observable=function(e){return Ce(e),e},e.options=Object.create(null),M.forEach(function(t){e.options[t+"s"]=Object.create(null)}),e.options._base=e,A(e.options.components,Tn),function(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=k(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):"function"==typeof e&&e.apply(null,n),t.push(e),this}}(e),function(e){e.mixin=function(e){return this.options=De(this.options,e),this}}(e),Cn(e),function(e){M.forEach(function(t){e[t]=function(e,n){return n?("component"===t&&s(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}})}(e)}(wn),Object.defineProperty(wn.prototype,"$isServer",{get:te}),Object.defineProperty(wn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(wn,"FunctionalRenderContext",{value:Tt}),wn.version="2.6.1
65342
vendor: 55,824 bytes, line 6534
6534";var En=p("style,class"),Nn=p("input,textarea,option,select,progress"),jn=function(e,t,n){return"value"===n&&Nn(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},Dn=p("contenteditable,draggable,spellcheck"),Ln=p("events,caret,typing,plaintext-only"),Mn=function(e,t){return Hn(t)||"false"===t?"false":"contenteditable"===e&&Ln(t)?t:"true"},In=p("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Fn="http://www.w3.org/1999/xlink",Pn=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},Rn=function(e){return Pn(e)?e.slice(6,e.length):""},Hn=function(e){return null==e||!1===e};function Bn(e){for(var t=e.data,r=e,i=e;n(i.componentInstance);)(i=i.componentInstance._vnode)&&i.data&&(t=Un(i.data,t));for(;n(r=r.parent);)r&&r.data&&(t=Un(t,r.data));return function(e,t){if(n(e)||n(t))return zn(e,Vn(t));return""}(t.staticClass,t.class)}function Un(e,t){return{staticClass:zn(e.staticClass,t.staticClass),class:n(e.class)?[e.class,t.class]:t.class}}function zn(e,t){return e?t?e+" "+t:e:t||""}function Vn(e){return Array.isArray(e)?function(e){for(var t,r="",i=0,o=e.length;i<o;i++)n(t=Vn(e[i]))&&""!==t&&(r&&(r+=" "),r+=t);return r}(e):o(e)?function(e){var t="";for(var n in e)e[n]&&(t&&(t+=" "),t+=n);return t}(e):"string"==typeof e?e:""}var Kn={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},Jn=p("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),qn=p("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),Wn=function(e){return Jn(e)||qn(e)};function Zn(e){return qn(e)?"svg":"math"===e?"math":void 0}var Gn=Object.create(null);var Xn=p("text,number,password,search,email,tel,url");function Yn(e){if("string"==typeof e){var t=document.querySelector(e);return t||document.createElement("div")}return e}var Qn=Object.freeze({createElement:function(e,t){var n=document.createElement(e);return"select"!==e?n:(t.data&&t.data.attrs&&void 0!==t.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n)},createElementNS:function(e,t){return document.createElementNS(Kn[e],t)},createTextNode:function(e){return document.createTextNode(e)},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,n){e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){e.appendChild(t)},parentNode:function(e){return e.parentNode},nextSibling:function(e){return e.nextSibling},tagName:function(e){return e.tagName},setTextContent:function(e,t){e.textContent=t},setStyleScope:function(e,t){e.setAttribute(t,"")}}),er={create:function(e,t){tr(t)},update:function(e,t){e.data.ref!==t.data.ref&&(tr(e,!0),tr(t))},destroy:function(e){tr(e,!0)}};function tr(e,t){var r=e.data.ref;if(n(r)){var i=e.context,o=e.componentInstance||e.elm,a=i.$refs;t?Array.isArray(a[r])?h(a[r],o):a[r]===o&&(a[r]=void 0):e.data.refInFor?Array.isArray(a[r])?a[r].indexOf(o)<0&&a[r].push(o):a[r]=[o]:a[r]=o}}var nr=new pe("",{},[]),rr=["create","activate","update","remove","destroy"];function ir(e,i){return e.key===i.key&&(e.tag===i.tag&&e.isComment===i.isComment&&n(e.data)===n(i.data)&&function(e,t){if("input"!==e.tag)return!0;var r,i=n(r=e.data)&&n(r=r.attrs)&&r.type,o=n(r=t.data)&&n(r=r.attrs)&&r.type;return i===o||Xn(i)&&Xn(o)}(e,i)||r(e.isAsyncPlaceholder)&&e.asyncFactory===i.asyncFactory&&t(i.asyncFactory.error))}function or(e,t,r){var i,o,a={};for(i=t;i<=r;++i)n(o=e[i].key)&&(a[o]=i);return a}var ar={create:sr,update:sr,destroy:function(e){sr(e,nr)}};function sr(e,t){(e.data.directives||t.data.directives)&&function(e,t){var n,r,i,o=e===nr,a=t===nr,s=ur(e.data.directives,e.context),c=ur(t.data.directives,t.context),u=[],l=[];for(n in c)r=s[n],i=c[n],r?(i.oldValue=r.value,i.oldArg=r.arg,fr(i,"update",t,e),i.def&&i.def.componentUpdated&&l.push(i)):(fr(i,"bind",t,e),i.def&&i.def.inserted&&u.push(i));if(u.length){var f=function(){for(var n=0;n<u.length;n++)fr(u[n],"inserted",t,e)};o?it(t,"insert",f):f()}l.length&&it(t,"postpatch",function(){for(var n=0;n<l.length;n++)fr(l[n],"componentUpdated",t,e)});if(!o)for(n in s)c[n]||fr(s[n],"unbind",e,e,a)}(e,t)}var cr=Object.create(null);function ur(e,t){var n,r,i=Object.create(null);if(!e)return i;for(n=0;n<e.length;n++)(r=e[n]).modifiers||(r.modifiers=cr),i[lr(r)]=r,r.def=Le(t.$options,"directives",r.name);return i}function lr(e){return e.rawName||e.name+"."+Object.keys(e.modifiers||{}).join(".")}function fr(e,t,n,r,i){var o=e.def&&e.def[t];if(o)try{o(n.elm,e,n,r,i)}catch(r){Re(r,n.context,"directive "+e.name+" "+t+" hook")}}var pr=[er,ar];function dr(e,r){var i=r.componentOptions;if(!(n(i)&&!1===i.Ctor.options.inheritAttrs||t(e.data.attrs)&&t(r.data.attrs))){var o,a,s=r.elm,c=e.data.attrs||{},u=r.data.attrs||{};for(o in n(u.__ob__)&&(u=r.data.attrs=A({},u)),u)a=u[o],c[o]!==a&&vr(s,o,a);for(o in(q||Z)&&u.value!==c.value&&vr(s,"value",u.value),c)t(u[o])&&(Pn(o)?s.removeAttributeNS(Fn,Rn(o)):Dn(o)||s.removeAttribute(o))}}function vr(e,t,n){e.tagName.indexOf("-")>-1?hr(e,t,n):In(t)?Hn(n)?e.removeAttribute(t):(n="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,n)):Dn(t)?e.setAttribute(t,Mn(t,n)):Pn(t)?Hn(n)?e.removeAttributeNS(Fn,Rn(t)):e.setAttributeNS(Fn,t,n):hr(e,t,n)}function hr(e,t,n){if(Hn(n))e.removeAttribute(t);else{if(q&&!W&&"TEXTAREA"===e.tagName&&"placeholder"===t&&""!==n&&!e.__ieph){var r=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",r)};e.addEventListener("input",r),e.__ieph=!0}e.setAttribute(t,n)}}var mr={create:dr,update:dr};function yr(e,r){var i=r.elm,o=r.data,a=e.data;if(!(t(o.staticClass)&&t(o.class)&&(t(a)||t(a.staticClass)&&t(a.class)))){var s=Bn(r),c=i._transitionClasses;n(c)&&(s=zn(s,Vn(c))),s!==i._prevClass&&(i.setAttribute("class",s),i._prevClass=s)}}var gr,_r,br,$r,wr,Cr,xr={create:yr,update:yr},kr=/[\w).+\-_$\]]/;function Ar(e){var t,n,r,i,o,a=!1,s=!1,c=!1,u=!1,l=0,f=0,p=0,d=0;for(r=0;r<e.length;r++)if(n=t,t=e.charCodeAt(r),a)39===t&&92!==n&&(a=!1);else if(s)34===t&&92!==n&&(s=!1);else if(c)96===t&&92!==n&&(c=!1);else if(u)47===t&&92!==n&&(u=!1);else if(124!==t||124===e.charCodeAt(r+1)||124===e.charCodeAt(r-1)||l||f||p){switch(t){case 34:s=!0;break;case 39:a=!0;break;case 96:c=!0;break;case 40:p++;break;case 41:p--;break;case 91:f++;break;case 93:f--;break;case 123:l++;break;case 125:l--}if(47===t){for(var v=r-1,h=void 0;v>=0&&" "===(h=e.charAt(v));v--);h&&kr.test(h)||(u=!0)}}else void 0===i?(d=r+1,i=e.slice(0,r).trim()):m();function m(){(o||(o=[])).push(e.slice(d,r).trim()),d=r+1}if(void 0===i?i=e.slice(0,r).trim():0!==d&&m(),o)for(r=0;r<o.length;r++)i=Or(i,o[r]);return i}function Or(e,t){var n=t.indexOf("(");if(n<0)return'_f("'+t+'")('+e+")";var r=t.slice(0,n),i=t.slice(n+1);return'_f("'+r+'")('+e+(")"!==i?","+i:i)}function Sr(e,t){console.error("[Vue compiler]: "+e)}function Tr(e,t){return e?e.map(function(e){return e[t]}).filter(function(e){return e}):[]}function Er(e,t,n,r,i){(e.props||(e.props=[])).push(Rr({name:t,value:n,dynamic:i},r)),e.plain=!1}function Nr(e,t,n,r,i){(i?e.dynamicAttrs||(e.dynamicAttrs=[]):e.attrs||(e.attrs=[])).push(Rr({name:t,value:n,dynamic:i},r)),e.plain=!1}function jr(e,t,n,r){e.attrsMap[t]=n,e.attrsList.push(Rr({name:t,value:n},r))}function Dr(e,t,n,r,i,o,a,s){(e.directives||(e.directives=[])).push(Rr({name:t,rawName:n,value:r,arg:i,isDynamicArg:o,modifiers:a},s)),e.plain=!1}function Lr(e,t,n){return n?"_p("+t+',"'+e+'")':e+t}function Mr(t,n,r,i,o,a,s,c){var u;(i=i||e).right?c?n="("+n+")==='click'?'contextmenu':("+n+")":"click"===n&&(n="contextmenu",delete i.right):i.middle&&(c?n="("+n+")==='click'?'mouseup':("+n+")":"click"===n&&(n="mouseup")),i.capture&&(delete i.capture,n=Lr("!",n,c)),i.once&&(delete i.once,n=Lr("~",n,c)),i.passive&&(delete i.passive,n=Lr("&",n,c)),i.native?(delete i.native,u=t.nativeEvents||(t.nativeEvents={})):u=t.events||(t.events={});var l=Rr({value:r.trim(),dynamic:c},s);i!==e&&(l.modifiers=i);var f=u[n];Array.isArray(f)?o?f.unshift(l):f.push(l):u[n]=f?o?[l,f]:[f,l]:l,t.plain=!1}function Ir(e,t,n){var r=Fr(e,":"+t)||Fr(e,"v-bind:"+t);if(null!=r)return Ar(r);if(!1!==n){var i=Fr(e,t);if(null!=i)return JSON.stringify(i)}}function Fr(e,t,n){var r;if(null!=(r=e.attrsMap[t]))for(var i=e.attrsList,o=0,a=i.length;o<a;o++)if(i[o].name===t){i.splice(o,1);break}return n&&delete e.attrsMap[t],r}function Pr(e,t){for(var n=e.attrsList,r=0,i=n.length;r<i;r++){var o=n[r];if(t.test(o.name))return n.splice(r,1),o}}function Rr(e,t){return t&&(null!=t.start&&(e.start=t.start),null!=t.end&&(e.end=t.end)),e}function Hr(e,t,n){var r=n||{},i=r.number,o="$$v";r.trim&&(o="(typeof $$v === 'string'? $$v.trim(): $$v)"),i&&(o="_n("+o+")");var a=Br(t,o);e.model={value:"("+t+")",expression:JSON.stringify(t),callback:"function ($$v) {"+a+"}"}}function Br(e,t){var n=function(e){if(e=e.trim(),gr=e.length,e.indexOf("[")<0||e.lastIndexOf("]")<gr-1)return($r=e.lastIndexOf("."))>-1?{exp:e.slice(0,$r),key:'"'+e.slice($r+1)+'"'}:{exp:e,key:null};_r=e,$r=wr=Cr=0;for(;!zr();)Vr(br=Ur())?Jr(br):91===br&&Kr(br);return{exp:e.slice(0,wr),key:e.slice(wr+1,Cr)}}(e);return null===n.key?e+"="+t:"$set("+n.exp+", "+n.key+", "+t+")"}function Ur(){return _r.charCodeAt(++$r)}function zr(){return $r>=gr}function Vr(e){return 34===e||39===e}function Kr(e){var t=1;for(wr=$r;!zr();)if(Vr(e=Ur()))Jr(e);else if(91===e&&t++,93===e&&t--,0===t){Cr=$r;break}}function Jr(e){for(var t=e;!zr()&&(e=Ur())!==t;);}var qr,Wr="__r",Zr="__c";function Gr(e,t,n){var r=qr;return function i(){null!==t.apply(null,arguments)&&Qr(e,i,n,r)}}var Xr=Ve&&!(X&&Number(X[1])<=53);function Yr(e,t,n,r){if(Xr){var i=an,o=t;t=o._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=i||e.timeStamp<=0||e.target.ownerDocument!==document)return o.apply(this,arguments)}}qr.addEventListener(e,t,Q?{capture:n,passive:r}:n)}function Qr(e,t,n,r){(r||qr).removeEventListener(e,t._wrapper||t,n)}function ei(e,r){if(!t(e.data.on)||!t(r.data.on)){var i=r.data.on||{},o=e.data.on||{};qr=r.elm,function(e){if(n(e[Wr])){var t=q?"change":"input";e[t]=[].concat(e[Wr],e[t]||[]),delete e[Wr]}n(e[Zr])&&(e.change=[].concat(e[Zr],e.change||[]),delete e[Zr])}(i),rt(i,o,Yr,Qr,Gr,r.context),qr=void 0}}var ti,ni={create:ei,update:ei};function ri(e,r){if(!t(e.data.domProps)||!t(r.data.domProps)){var i,o,a=r.elm,s=e.data.domProps||{},c=r.data.domProps||{};for(i in n(c.__ob__)&&(c=r.data.domProps=A({},c)),s)i in c||(a[i]="");for(i in c){if(o=c[i],"textContent"===i||"innerHTML"===i){if(r.children&&(r.children.length=0),o===s[i])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===i&&"PROGRESS"!==a.tagName){a._value=o;var u=t(o)?"":String(o);ii(a,u)&&(a.value=u)}else if("innerHTML"===i&&qn(a.tagName)&&t(a.innerHTML)){(ti=ti||document.createElement("div")).innerHTML="<svg>"+o+"</svg>";for(var l=ti.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;l.firstChild;)a.appendChild(l.firstChild)}else if(o!==s[i])try{a[i]=o}catch(e){}}}}function ii(e,t){return!e.composing&&("OPTION"===e.tagName||function(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}(e,t)||function(e,t){var r=e.value,i=e._vModifiers;if(n(i)){if(i.number)return f(r)!==f(t);if(i.trim)return r.trim()!==t.trim()}return r!==t}(e,t))}var oi={create:ri,update:ri},ai=g(function(e){var t={},n=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach(function(e){if(e){var r=e.split(n);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t});function si(e){var t=ci(e.style);return e.staticStyle?A(e.staticStyle,t):t}function ci(e){return Array.isArray(e)?O(e):"string"==typeof e?ai(e):e}var ui,li=/^--/,fi=/\s*!important$/,pi=function(e,t,n){if(li.test(t))e.style.setProperty(t,n);else if(fi.test(n))e.style.setProperty(C(t),n.replace(fi,""),"important");else{var r=vi(t);if(Array.isArray(n))for(var i=0,o=n.length;i<o;i++)e.style[r]=n[i];else e.style[r]=n}},di=["Webkit","Moz","ms"],vi=g(function(e){if(ui=ui||document.createElement("div").style,"filter"!==(e=b(e))&&e in ui)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<di.length;n++){var r=di[n]+t;if(r in ui)return r}});function hi(e,r){var i=r.data,o=e.data;if(!(t(i.staticStyle)&&t(i.style)&&t(o.staticStyle)&&t(o.style))){var a,s,c=r.elm,u=o.staticStyle,l=o.normalizedStyle||o.style||{},f=u||l,p=ci(r.data.style)||{};r.data.normalizedStyle=n(p.__ob__)?A({},p):p;var d=function(e,t){var n,r={};if(t)for(var i=e;i.componentInstance;)(i=i.componentInstance._vnode)&&i.data&&(n=si(i.data))&&A(r,n);(n=si(e.data))&&A(r,n);for(var o=e;o=o.parent;)o.data&&(n=si(o.data))&&A(r,n);return r}(r,!0);for(s in f)t(d[s])&&pi(c,s,"");for(s in d)(a=d[s])!==f[s]&&pi(c,s,null==a?"":a)}}var mi={create:hi,update:hi},yi=/\s+/;function gi(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(yi).forEach(function(t){return e.classList.add(t)}):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function _i(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(yi).forEach(function(t){return e.classList.remove(t)}):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var n=" "+(e.getAttribute("class")||"")+" ",r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?e.setAttribute("class",n):e.removeAttribute("class")}}function bi(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&A(t,$i(e.name||"v")),A(t,e),t}return"string"==typeof e?$i(e):void 0}}var $i=g(function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}}),wi=z&&!W,Ci="transition",xi="animation",ki="transition",Ai="transitionend",Oi="animation",Si="animationend";wi&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(ki="WebkitTransition",Ai="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Oi="WebkitAnimation",Si="webkitAnimationEnd"));var Ti=z?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function Ei(e){Ti(function(){Ti(e)})}function Ni(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),gi(e,t))}function ji(e,t){e._transitionClasses&&h(e._transitionClasses,t),_i(e,t)}function Di(e,t,n){var r=Mi(e,t),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s=i===Ci?Ai:Si,c=0,u=function(){e.removeEventListener(s,l),n()},l=function(t){t.target===e&&++c>=a&&u()};setTimeout(function(){c<a&&u()},o+1),e.addEventListener(s,l)}var Li=/\b(transform|all)(,|$)/;function Mi(e,t){var n,r=window.getComputedStyle(e),i=(r[ki+"Delay"]||"").split(", "),o=(r[ki+"Duration"]||"").split(", "),a=Ii(i,o),s=(r[Oi+"Delay"]||"").split(", "),c=(r[Oi+"Duration"]||"").split(", "),u=Ii(s,c),l=0,f=0;return t===Ci?a>0&&(n=Ci,l=a,f=o.length):t===xi?u>0&&(n=xi,l=u,f=c.length):f=(n=(l=Math.max(a,u))>0?a>u?Ci:xi:null)?n===Ci?o.length:c.length:0,{type:n,timeout:l,propCount:f,hasTransform:n===Ci&&Li.test(r[ki+"Property"])}}function Ii(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max.apply(null,t.map(function(t,n){return Fi(t)+Fi(e[n])}))}function Fi(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}function Pi(e,r){var i=e.elm;n(i._leaveCb)&&(i._leaveCb.cancelled=!0,i._leaveCb());var a=bi(e.data.transition);if(!t(a)&&!n(i._enterCb)&&1===i.nodeType){for(var s=a.css,c=a.type,u=a.enterClass,l=a.enterToClass,p=a.enterActiveClass,d=a.appearClass,v=a.appearToClass,h=a.appearActiveClass,m=a.beforeEnter,y=a.enter,g=a.afterEnter,_=a.enterCancelled,b=a.beforeAppear,$=a.appear,w=a.afterAppear,C=a.appearCancelled,x=a.duration,k=Wt,A=Wt.$vnode;A&&A.parent;)k=A.context,A=A.parent;var O=!k._isMounted||!e.isRootInsert;if(!O||$||""===$){var S=O&&d?d:u,T=O&&h?h:p,E=O&&v?v:l,N=O&&b||m,j=O&&"function"==typeof $?$:y,L=O&&w||g,M=O&&C||_,I=f(o(x)?x.enter:x),F=!1!==s&&!W,P=Bi(j),R=i._enterCb=D(function(){F&&(ji(i,E),ji(i,T)),R.cancelled?(F&&ji(i,S),M&&M(i)):L&&L(i),i._enterCb=null});e.data.show||it(e,"insert",function(){var t=i.parentNode,n=t&&t._pending&&t._pending[e.key];n&&n.tag===e.tag&&n.elm._leaveCb&&n.elm._leaveCb(),j&&j(i,R)}),N&&N(i),F&&(Ni(i,S),Ni(i,T),Ei(function(){ji(i,S),R.cancelled||(Ni(i,E),P||(Hi(I)?setTimeout(R,I):Di(i,c,R)))})),e.data.show&&(r&&r(),j&&j(i,R)),F||P||R()}}}function Ri(e,r){var i=e.elm;n(i._enterCb)&&(i._enterCb.cancelled=!0,i._enterCb());var a=bi(e.data.transition);if(t(a)||1!==i.nodeType)return r();if(!n(i._leaveCb)){var s=a.css,c=a.type,u=a.leaveClass,l=a.leaveToClass,p=a.leaveActiveClass,d=a.beforeLeave,v=a.leave,h=a.afterLeave,m=a.leaveCancelled,y=a.delayLeave,g=a.duration,_=!1!==s&&!W,b=Bi(v),$=f(o(g)?g.leave:g),w=i._leaveCb=D(function(){i.parentNode&&i.parentNode._pending&&(i.parentNode._pending[e.key]=null),_&&(ji(i,l),ji(i,p)),w.cancelled?(_&&ji(i,u),m&&m(i)):(r(),h&&h(i)),i._leaveCb=null});y?y(C):C()}function C(){w.cancelled||(!e.data.show&&i.parentNode&&((i.parentNode._pending||(i.parentNode._pending={}))[e.key]=e),d&&d(i),_&&(Ni(i,u),Ni(i,p),Ei(function(){ji(i,u),w.cancelled||(Ni(i,l),b||(Hi($)?setTimeout(w,$):Di(i,c,w)))})),v&&v(i,w),_||b||w())}}function Hi(e){return"number"==typeof e&&!isNaN(e)}function Bi(e){if(t(e))return!1;var r=e.fns;return n(r)?Bi(Array.isArray(r)?r[0]:r):(e._length||e.length)>1}function Ui(e,t){!0!==t.data.show&&Pi(t)}var zi=function(e){var o,a,s={},c=e.modules,u=e.nodeOps;for(o=0;o<rr.length;++o)for(s[rr[o]]=[],a=0;a<c.length;++a)n(c[a][rr[o]])&&s[rr[o]].push(c[a][rr[o]]);function l(e){var t=u.parentNode(e);n(t)&&u.removeChild(t,e)}function f(e,t,i,o,a,c,l){if(n(e.elm)&&n(c)&&(e=c[l]=me(e)),e.isRootInsert=!a,!function(e,t,i,o){var a=e.data;if(n(a)){var c=n(e.componentInstance)&&a.keepAlive;if(n(a=a.hook)&&n(a=a.init)&&a(e,!1),n(e.componentInstance))return d(e,t),v(i,e.elm,o),r(c)&&function(e,t,r,i){for(var o,a=e;a.componentInstance;)if(a=a.componentInstance._vnode,n(o=a.data)&&n(o=o.transition)){for(o=0;o<s.activate.length;++o)s.activate[o](nr,a);t.push(a);break}v(r,e.elm,i)}(e,t,i,o),!0}}(e,t,i,o)){var f=e.data,p=e.children,m=e.tag;n(m)?(e.elm=e.ns?u.createElementNS(e.ns,m):u.createElement(m,e),g(e),h(e,p,t),n(f)&&y(e,t),v(i,e.elm,o)):r(e.isComment)?(e.elm=u.createComment(e.text),v(i,e.elm,o)):(e.elm=u.createTextNode(e.text),v(i,e.elm,o))}}function d(e,t){n(e.data.pendingInsert)&&(t.push.apply(t,e.data.pendingInsert),e.data.pendingInsert=null),e.elm=e.componentInstance.$el,m(e)?(y(e,t),g(e)):(tr(e),t.push(e))}function v(e,t,r){n(e)&&(n(r)?u.parentNode(r)===e&&u.insertBefore(e,t,r):u.appendChild(e,t))}function h(e,t,n){if(Array.isArray(t))for(var r=0;r<t.length;++r)f(t[r],n,e.elm,null,!0,t,r);else i(e.text)&&u.appendChild(e.elm,u.createTextNode(String(e.text)))}function m(e){for(;e.componentInstance;)e=e.componentInstance._vnode;return n(e.tag)}function y(e,t){for(var r=0;r<s.create.length;++r)s.create[r](nr,e);n(o=e.data.hook)&&(n(o.create)&&o.create(nr,e),n(o.insert)&&t.push(e))}function g(e){var t;if(n(t=e.fnScopeId))u.setStyleScope(e.elm,t);else for(var r=e;r;)n(t=r.context)&&n(t=t.$options._scopeId)&&u.setStyleScope(e.elm,t),r=r.parent;n(t=Wt)&&t!==e.context&&t!==e.fnContext&&n(t=t.$options._scopeId)&&u.setStyleScope(e.elm,t)}function _(e,t,n,r,i,o){for(;r<=i;++r)f(n[r],o,e,t,!1,n,r)}function b(e){var t,r,i=e.data;if(n(i))for(n(t=i.hook)&&n(t=t.destroy)&&t(e),t=0;t<s.destroy.length;++t)s.destroy[t](e);if(n(t=e.children))for(r=0;r<e.children.length;++r)b(e.children[r])}function $(e,t,r){for(;t<=r;++t){var i=e[t];n(i)&&(n(i.tag)?(w(i),b(i)):l(i.elm))}}function w(e,t){if(n(t)||n(e.data)){var r,i=s.remove.length+1;for(n(t)?t.listeners+=i:t=function(e,t){function n(){0==--n.listeners&&l(e)}return n.listeners=t,n}(e.elm,i),n(r=e.componentInstance)&&n(r=r._vnode)&&n(r.data)&&w(r,t),r=0;r<s.remove.length;++r)s.remove[r](e,t);n(r=e.data.hook)&&n(r=r.remove)?r(e,t):t()}else l(e.elm)}function C(e,t,r,i){for(var o=r;o<i;o++){var a=t[o];if(n(a)&&ir(e,a))return o}}function x(e,i,o,a,c,l){if(e!==i){n(i.elm)&&n(a)&&(i=a[c]=me(i));var p=i.elm=e.elm;if(r(e.isAsyncPlaceholder))n(i.asyncFactory.resolved)?O(e.elm,i,o):i.isAsyncPlaceholder=!0;else if(r(i.isStatic)&&r(e.isStatic)&&i.key===e.key&&(r(i.isCloned)||r(i.isOnce)))i.componentInstance=e.componentInstance;else{var d,v=i.data;n(v)&&n(d=v.hook)&&n(d=d.prepatch)&&d(e,i);var h=e.children,y=i.children;if(n(v)&&m(i)){for(d=0;d<s.update.length;++d)s.update[d](e,i);n(d=v.hook)&&n(d=d.update)&&d(e,i)}t(i.text)?n(h)&&n(y)?h!==y&&function(e,r,i,o,a){for(var s,c,l,p=0,d=0,v=r.length-1,h=r[0],m=r[v],y=i.length-1,g=i[0],b=i[y],w=!a;p<=v&&d<=y;)t(h)?h=r[++p]:t(m)?m=r[--v]:ir(h,g)?(x(h,g,o,i,d),h=r[++p],g=i[++d]):ir(m,b)?(x(m,b,o,i,y),m=r[--v],b=i[--y]):ir(h,b)?(x(h,b,o,i,y),w&&u.insertBefore(e,h.elm,u.nextSibling(m.elm)),h=r[++p],b=i[--y]):ir(m,g)?(x(m,g,o,i,d),w&&u.insertBefore(e,m.elm,h.elm),m=r[--v],g=i[++d]):(t(s)&&(s=or(r,p,v)),t(c=n(g.key)?s[g.key]:C(g,r,p,v))?f(g,o,e,h.elm,!1,i,d):ir(l=r[c],g)?(x(l,g,o,i,d),r[c]=void 0,w&&u.insertBefore(e,l.elm,h.elm)):f(g,o,e,h.elm,!1,i,d),g=i[++d]);p>v?_(e,t(i[y+1])?null:i[y+1].elm,i,d,y,o):d>y&&$(r,p,v)}(p,h,y,o,l):n(y)?(n(e.text)&&u.setTextContent(p,""),_(p,null,y,0,y.length-1,o)):n(h)?$(h,0,h.length-1):n(e.text)&&u.setTextContent(p,""):e.text!==i.text&&u.setTextContent(p,i.text),n(v)&&n(d=v.hook)&&n(d=d.postpatch)&&d(e,i)}}}function k(e,t,i){if(r(i)&&n(e.parent))e.parent.data.pendingInsert=t;else for(var o=0;o<t.length;++o)t[o].data.hook.insert(t[o])}var A=p("attrs,class,staticClass,staticStyle,key");function O(e,t,i,o){var a,s=t.tag,c=t.data,u=t.children;if(o=o||c&&c.pre,t.elm=e,r(t.isComment)&&n(t.asyncFactory))return t.isAsyncPlaceholder=!0,!0;if(n(c)&&(n(a=c.hook)&&n(a=a.init)&&a(t,!0),n(a=t.componentInstance)))return d(t,i),!0;if(n(s)){if(n(u))if(e.hasChildNodes())if(n(a=c)&&n(a=a.domProps)&&n(a=a.innerHTML)){if(a!==e.innerHTML)return!1}else{for(var l=!0,f=e.firstChild,p=0;p<u.length;p++){if(!f||!O(f,u[p],i,o)){l=!1;break}f=f.nextSibling}if(!l||f)return!1}else h(t,u,i);if(n(c)){var v=!1;for(var m in c)if(!A(m)){v=!0,y(t,i);break}!v&&c.class&&et(c.class)}}else e.data!==t.text&&(e.data=t.text);return!0}return function(e,i,o,a){if(!t(i)){var c,l=!1,p=[];if(t(e))l=!0,f(i,p);else{var d=n(e.nodeType);if(!d&&ir(e,i))x(e,i,p,null,null,a);else{if(d){if(1===e.nodeType&&e.hasAttribute(L)&&(e.removeAttribute(L),o=!0),r(o)&&O(e,i,p))return k(i,p,!0),e;c=e,e=new pe(u.tagName(c).toLowerCase(),{},[],void 0,c)}var v=e.elm,h=u.parentNode(v);if(f(i,p,v._leaveCb?null:h,u.nextSibling(v)),n(i.parent))for(var y=i.parent,g=m(i);y;){for(var _=0;_<s.destroy.length;++_)s.destroy[_](y);if(y.elm=i.elm,g){for(var w=0;w<s.create.length;++w)s.create[w](nr,y);var C=y.data.hook.insert;if(C.merged)for(var A=1;A<C.fns.length;A++)C.fns[A]()}else tr(y);y=y.parent}n(h)?$([e],0,0):n(e.tag)&&b(e)}}return k(i,p,l),i.elm}n(e)&&b(e)}}({nodeOps:Qn,modules:[mr,xr,ni,oi,mi,z?{create:Ui,activate:Ui,remove:function(e,t){!0!==e.data.show?Ri(e,t):t()}}:{}].concat(pr)});W&&document.addEventListener("selectionchange",function(){var e=document.activeElement;e&&e.vmodel&&Xi(e,"input")});var Vi={inserted:function(e,t,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?it(n,"postpatch",function(){Vi.componentUpdated(e,t,n)}):Ki(e,t,n.context),e._vOptions=[].map.call(e.options,Wi)):("textarea"===n.tag||Xn(e.type))&&(e._vModifiers=t.modifiers,t.modifiers.lazy||(e.addEventListener("compositionstart",Zi),e.addEventListener("compositionend",Gi),e.addEventListener("change",Gi),W&&(e.vmodel=!0)))},componentUpdated:function(e,t,n){if("select"===n.tag){Ki(e,t,n.context);var r=e._vOptions,i=e._vOptions=[].map.call(e.options,Wi);if(i.some(function(e,t){return!N(e,r[t])}))(e.multiple?t.value.some(function(e){return qi(e,i)}):t.value!==t.oldValue&&qi(t.value,i))&&Xi(e,"change")}}};function Ki(e,t,n){Ji(e,t,n),(q||Z)&&setTimeout(function(){Ji(e,t,n)},0)}function Ji(e,t,n){var r=t.value,i=e.multiple;if(!i||Array.isArray(r)){for(var o,a,s=0,c=e.options.length;s<c;s++)if(a=e.options[s],i)o=j(r,Wi(a))>-1,a.selected!==o&&(a.selected=o);else if(N(Wi(a),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));i||(e.selectedIndex=-1)}}function qi(e,t){return t.every(function(t){return!N(t,e)})}function Wi(e){return"_value"in e?e._value:e.value}function Zi(e){e.target.composing=!0}function Gi(e){e.target.composing&&(e.target.composing=!1,Xi(e.target,"input"))}function Xi(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function Yi(e){return!e.componentInstance||e.data&&e.data.transition?e:Yi(e.componentInstance._vnode)}var Qi={model:Vi,show:{bind:function(e,t,n){var r=t.value,i=(n=Yi(n)).data&&n.data.transition,o=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&i?(n.data.show=!0,Pi(n,function(){e.style.display=o})):e.style.display=r?o:"none"},update:function(e,t,n){var r=t.value;!r!=!t.oldValue&&((n=Yi(n)).data&&n.data.transition?(n.data.show=!0,r?Pi(n,function(){e.style.display=e.__vOriginalDisplay}):Ri(n,function(){e.style.display="none"})):e.style.display=r?e.__vOriginalDisplay:"none")},unbind:function(e,t,n,r,i){i||(e.style.display=e.__vOriginalDisplay)}}},eo={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function to(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?to(zt(t.children)):e}function no(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var i=n._parentListeners;for(var o in i)t[b(o)]=i[o];return t}function ro(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}var io=function(e){return e.tag||Ut(e)},oo=function(e){return"show"===e.name},ao={name:"transition",props:eo,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(io)).length){var r=this.mode,o=n[0];if(function(e){for(;e=e.parent;)if(e.data.transition)return!0}(this.$vnode))return o;var a=to(o);if(!a)return o;if(this._leaving)return ro(e,o);var s="__transition-"+this._uid+"-";a.key=null==a.key?a.isComment?s+"comment":s+a.tag:i(a.key)?0===String(a.key).indexOf(s)?a.key:s+a.key:a.key;var c=(a.data||(a.data={})).transition=no(this),u=this._vnode,l=to(u);if(a.data.directives&&a.data.directives.some(oo)&&(a.data.show=!0),l&&l.data&&!function(e,t){return t.key===e.key&&t.tag===e.tag}(a,l)&&!Ut(l)&&(!l.componentInstance||!l.componentInstance._vnode.isComment)){var f=l.data.transition=A({},c);if("out-in"===r)return this._leaving=!0,it(f,"afterLeave",function(){t._leaving=!1,t.$forceUpdate()}),ro(e,o);if("in-out"===r){if(Ut(a))return u;var p,d=function(){p()};it(c,"afterEnter",d),it(c,"enterCancelled",d),it(f,"delayLeave",function(e){p=e})}}return o}}},so=A({tag:String,moveClass:String},eo);function co(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function uo(e){e.data.newPos=e.elm.getBoundingClientRect()}function lo(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,i=t.top-n.top;if(r||i){e.data.moved=!0;var o=e.elm.style;o.transform=o.WebkitTransform="translate("+r+"px,"+i+"px)",o.transitionDuration="0s"}}delete so.mode;var fo={Transition:ao,TransitionGroup:{props:so,beforeMount:function(){var e=this,t=this._update;this._update=function(n,r){var i=Zt(e);e.__patch__(e._vnode,e.kept,!1,!0),e._vnode=e.kept,i(),t.call(e,n,r)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],a=no(this),s=0;s<i.length;s++){var c=i[s];c.tag&&null!=c.key&&0!==String(c.key).indexOf("__vlist")&&(o.push(c),n[c.key]=c,(c.data||(c.data={})).transition=a)}if(r){for(var u=[],l=[],f=0;f<r.length;f++){var p=r[f];p.data.transition=a,p.data.pos=p.elm.getBoundingClientRect(),n[p.key]?u.push(p):l.push(p)}this.kept=e(t,null,u),this.removed=l}return e(t,null,o)},updated:function(){var e=this.prevChildren,t=this.moveClass||(this.name||"v")+"-move";e.length&&this.hasMove(e[0].elm,t)&&(e.forEach(co),e.forEach(uo),e.forEach(lo),this._reflow=document.body.offsetHeight,e.forEach(function(e){if(e.data.moved){var n=e.elm,r=n.style;Ni(n,t),r.transform=r.WebkitTransform=r.transitionDuration="",n.addEventListener(Ai,n._moveCb=function e(r){r&&r.target!==n||r&&!/transform$/.test(r.propertyName)||(n.removeEventListener(Ai,e),n._moveCb=null,ji(n,t))})}}))},methods:{hasMove:function(e,t){if(!wi)return!1;if(this._hasMove)return this._hasMove;var n=e.cloneNode();e._transitionClasses&&e._transitionClasses.forEach(function(e){_i(n,e)}),gi(n,t),n.style.display="none",this.$el.appendChild(n);var r=Mi(n);return this.$el.removeChild(n),this._hasMove=r.hasTransform}}}};wn.config.mustUseProp=jn,wn.config.isReservedTag=Wn,wn.config.isReservedAttr=En,wn.config.getTagNamespace=Zn,wn.config.isUnknownElement=function(e){if(!z)return!0;if(Wn(e))return!1;if(e=e.toLowerCase(),null!=Gn[e])return Gn[e];var t=document.createElement(e);return e.indexOf("-")>-1?Gn[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:Gn[e]=/HTMLUnknownElement/.test(t.toString())},A(wn.options.directives,Qi),A(wn.options.components,fo),wn.prototype.__patch__=z?zi:S,wn.prototype.$mount=function(e,t){return function(e,t,n){var r;return e.$el=t,e.$options.render||(e.$options.render=ve),Yt(e,"beforeMount"),r=function(){e._update(e._render(),n)},new fn(e,r,S,{before:function(){e._isMounted&&!e._isDestroyed&&Yt(e,"beforeUpdate")}},!0),n=!1,null==e.$vnode&&(e._isMounted=!0,Yt(e,"mounted")),e}(this,e=e&&z?Yn(e):void 0,t)},z&&setTimeout(function(){F.devtools&&ne&&ne.emit("init",wn)},0);var po=/\{\{((?:.|\r?\n)+?)\}\}/g,vo=/[-.*+?^${}()|[\]\/\\]/g,ho=g(function(e){var t=e[0].replace(vo,"\\$&"),n=e[1].replace(vo,"\\$&");return new RegExp(t+"((?:.|\\n)+?)"+n,"g")});var mo={staticKeys:["staticClass"],transformNode:function(e,t){t.warn;var n=Fr(e,"class");n&&(e.staticClass=JSON.stringify(n));var r=Ir(e,"class",!1);r&&(e.classBinding=r)},genData:function(e){var t="";return e.staticClass&&(t+="staticClass:"+e.staticClass+","),e.classBinding&&(t+="class:"+e.classBinding+","),t}};var yo,go={staticKeys:["staticStyle"],transformNode:function(e,t){t.warn;var n=Fr(e,"style");n&&(e.staticStyle=JSON.stringify(ai(n)));var r=Ir(e,"style",!1);r&&(e.styleBinding=r)},genData:function(e){var t="";return e.staticStyle&&(t+="staticStyle:"+e.staticStyle+","),e.styleBinding&&(t+="style:("+e.styleBinding+"),"),t}},_o=function(e){return(yo=yo||document.createElement("div")).innerHTML=e,yo.textContent},bo=p("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),$o=p("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),wo=p("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),Co=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,xo=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,ko="[a-zA-Z_][\\-\\.0-9_a-zA-Z"+P.source+"]*",Ao="((?:"+ko+"\\:)?"+ko+")",Oo=new RegExp("^<"+Ao),So=/^\s*(\/?)>/,To=new RegExp("^<\\/"+Ao+"[^>]*>"),Eo=/^<!DOCTYPE [^>]+>/i,No=/^<!\--/,jo=/^<!\[/,Do=p("script,style,textarea",!0),Lo={},Mo={"<":"<",">":">",""":'"',"&":"&"," ":"\n","	":"\t","'":"'"},Io=/&(?:lt|gt|quot|amp|#39);/g,Fo=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,Po=p("pre,textarea",!0),Ro=function(e,t){return e&&Po(e)&&"\n"===t[0]};function Ho(e,t){var n=t?Fo:Io;return e.replace(n,function(e){return Mo[e]})}var Bo,Uo,zo,Vo,Ko,Jo,qo,Wo,Zo=/^@|^v-on:/,Go=/^v-|^@|^:|^#/,Xo=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Yo=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Qo=/^\(|\)$/g,ea=/^\[.*\]$/,ta=/:(.*)$/,na=/^:|^\.|^v-bind:/,ra=/\.[^.\]]+(?=[^\]]*$)/g,ia=/^v-slot(:|$)|^#/,oa=/[\r\n]/,aa=/\s+/g,sa=g(_o),ca="_empty_";function ua(e,t,n){return{type:1,tag:e,attrsList:t,attrsMap:ma(t),rawAttrsMap:{},parent:n,children:[]}}function la(e,t){Bo=t.warn||Sr,Jo=t.isPreTag||T,qo=t.mustUseProp||T,Wo=t.getTagNamespace||T;t.isReservedTag;zo=Tr(t.modules,"transformNode"),Vo=Tr(t.modules,"preTransformNode"),Ko=Tr(t.modules,"postTransformNode"),Uo=t.delimiters;var n,r,i=[],o=!1!==t.preserveWhitespace,a=t.whitespace,s=!1,c=!1;function u(e){if(l(e),s||e.processed||(e=fa(e,t)),i.length||e===n||n.if&&(e.elseif||e.else)&&da(n,{exp:e.elseif,block:e}),r&&!e.forbidden)if(e.elseif||e.else)a=e,(u=function(e){var t=e.length;for(;t--;){if(1===e[t].type)return e[t];e.pop()}}(r.children))&&u.if&&da(u,{exp:a.elseif,block:a});else{if(e.slotScope){var o=e.slotTarget||'"default"';(r.scopedSlots||(r.scopedSlots={}))[o]=e}r.children.push(e),e.parent=r}var a,u;e.children=e.children.filter(function(e){return!e.slotScope}),l(e),e.pre&&(s=!1),Jo(e.tag)&&(c=!1);for(var f=0;f<Ko.length;f++)Ko[f](e,t)}function l(e){if(!c)for(var t;(t=e.children[e.children.length-1])&&3===t.type&&" "===t.text;)e.children.pop()}return function(e,t){for(var n,r,i=[],o=t.expectHTML,a=t.isUnaryTag||T,s=t.canBeLeftOpenTag||T,c=0;e;){if(n=e,r&&Do(r)){var u=0,l=r.toLowerCase(),f=Lo[l]||(Lo[l]=new RegExp("([\\s\\S]*?)(</"+l+"[^>]*>)","i")),p=e.replace(f,function(e,n,r){return u=r.length,Do(l)||"noscript"===l||(n=n.replace(/<!\--([\s\S]*?)-->/g,"$1").replace(/<!\[CDATA\[([\s\S]*?)]]>/g,"$1")),Ro(l,n)&&(n=n.slice(1)),t.chars&&t.chars(n),""});c+=e.length-p.length,e=p,A(l,c-u,c)}else{var d=e.indexOf("<");if(0===d){if(No.test(e)){var v=e.indexOf("--\x3e");if(v>=0){t.shouldKeepComment&&t.comment(e.substring(4,v),c,c+v+3),C(v+3);continue}}if(jo.test(e)){var h=e.indexOf("]>");if(h>=0){C(h+2);continue}}var m=e.match(Eo);if(m){C(m[0].length);continue}var y=e.match(To);if(y){var g=c;C(y[0].length),A(y[1],g,c);continue}var _=x();if(_){k(_),Ro(_.tagName,e)&&C(1);continue}}var b=void 0,$=void 0,w=void 0;if(d>=0){for($=e.slice(d);!(To.test($)||Oo.test($)||No.test($)||jo.test($)||(w=$.indexOf("<",1))<0);)d+=w,$=e.slice(d);b=e.substring(0,d)}d<0&&(b=e),b&&C(b.length),t.chars&&b&&t.chars(b,c-b.length,c)}if(e===n){t.chars&&t.chars(e);break}}function C(t){c+=t,e=e.substring(t)}function x(){var t=e.match(Oo);if(t){var n,r,i={tagName:t[1],attrs:[],start:c};for(C(t[0].length);!(n=e.match(So))&&(r=e.match(xo)||e.match(Co));)r.start=c,C(r[0].length),r.end=c,i.attrs.push(r);if(n)return i.unarySlash=n[1],C(n[0].length),i.end=c,i}}function k(e){var n=e.tagName,c=e.unarySlash;o&&("p"===r&&wo(n)&&A(r),s(n)&&r===n&&A(n));for(var u=a(n)||!!c,l=e.attrs.length,f=new Array(l),p=0;p<l;p++){var d=e.attrs[p],v=d[3]||d[4]||d[5]||"",h="a"===n&&"href"===d[1]?t.shouldDecodeNewlinesForHref:t.shouldDecodeNewlines;f[p]={name:d[1],value:Ho(v,h)}}u||(i.push({tag:n,lowerCasedTag:n.toLowerCase(),attrs:f,start:e.start,end:e.end}),r=n),t.start&&t.start(n,f,u,e.start,e.end)}function A(e,n,o){var a,s;if(null==n&&(n=c),null==o&&(o=c),e)for(s=e.toLowerCase(),a=i.length-1;a>=0&&i[a].lowerCasedTag!==s;a--);else a=0;if(a>=0){for(var u=i.length-1;u>=a;u--)t.end&&t.end(i[u].tag,n,o);i.length=a,r=a&&i[a-1].tag}else"br"===s?t.start&&t.start(e,[],!0,n,o):"p"===s&&(t.start&&t.start(e,[],!1,n,o),t.end&&t.end(e,n,o))}A()}(e,{warn:Bo,expectHTML:t.expectHTML,isUnaryTag:t.isUnaryTag,canBeLeftOpenTag:t.canBeLeftOpenTag,shouldDecodeNewlines:t.shouldDecodeNewlines,shouldDecodeNewlinesForHref:t.shouldDecodeNewlinesForHref,shouldKeepComment:t.comments,outputSourceRange:t.outputSourceRange,start:function(e,o,a,l,f){var p=r&&r.ns||Wo(e);q&&"svg"===p&&(o=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];ya.test(r.name)||(r.name=r.name.replace(ga,""),t.push(r))}return t}(o));var d,v=ua(e,o,r);p&&(v.ns=p),"style"!==(d=v).tag&&("script"!==d.tag||d.attrsMap.type&&"text/javascript"!==d.attrsMap.type)||te()||(v.forbidden=!0);for(var h=0;h<Vo.length;h++)v=Vo[h](v,t)||v;s||(!function(e){null!=Fr(e,"v-pre")&&(e.pre=!0)}(v),v.pre&&(s=!0)),Jo(v.tag)&&(c=!0),s?function(e){var t=e.attrsList,n=t.length;if(n)for(var r=e.attrs=new Array(n),i=0;i<n;i++)r[i]={name:t[i].name,value:JSON.stringify(t[i].value)},null!=t[i].start&&(r[i].start=t[i].start,r[i].end=t[i].end);else e.pre||(e.plain=!0)}(v):v.processed||(pa(v),function(e){var t=Fr(e,"v-if");if(t)e.if=t,da(e,{exp:t,block:e});else{null!=Fr(e,"v-else")&&(e.else=!0);var n=Fr(e,"v-else-if");n&&(e.elseif=n)}}(v),function(e){null!=Fr(e,"v-once")&&(e.once=!0)}(v)),n||(n=v),a?u(v):(r=v,i.push(v))},end:function(e,t,n){var o=i[i.length-1];i.length-=1,r=i[i.length-1],u(o)},chars:function(e,t,n){if(r&&(!q||"textarea"!==r.tag||r.attrsMap.placeholder!==e)){var i,u,l,f=r.children;if(e=c||e.trim()?"script"===(i=r).tag||"style"===i.tag?e:sa(e):f.length?a?"condense"===a&&oa.test(e)?"":" ":o?" ":"":"")c||"condense"!==a||(e=e.replace(aa," ")),!s&&" "!==e&&(u=function(e,t){var n=t?ho(t):po;if(n.test(e)){for(var r,i,o,a=[],s=[],c=n.lastIndex=0;r=n.exec(e);){(i=r.index)>c&&(s.push(o=e.slice(c,i)),a.push(JSON.stringify(o)));var u=Ar(r[1].trim());a.push("_s("+u+")"),s.push({"@binding":u}),c=i+r[0].length}return c<e.length&&(s.push(o=e.slice(c)),a.push(JSON.stringify(o))),{expression:a.join("+"),tokens:s}}}(e,Uo))?l={type:2,expression:u.expression,tokens:u.tokens,text:e}:" "===e&&f.length&&" "===f[f.length-1].text||(l={type:3,text:e}),l&&f.push(l)}},comment:function(e,t,n){if(r){var i={type:3,text:e,isComment:!0};r.children.push(i)}}}),n}function fa(e,t){var n,r;(r=Ir(n=e,"key"))&&(n.key=r),e.plain=!e.key&&!e.scopedSlots&&!e.attrsList.length,function(e){var t=Ir(e,"ref");t&&(e.ref=t,e.refInFor=function(e){var t=e;for(;t;){if(void 0!==t.for)return!0;t=t.parent}return!1}(e))}(e),function(e){var t;"template"===e.tag?(t=Fr(e,"scope"),e.slotScope=t||Fr(e,"slot-scope")):(t=Fr(e,"slot-scope"))&&(e.slotScope=t);var n=Ir(e,"slot");n&&(e.slotTarget='""'===n?'"default"':n,e.slotTargetDynamic=!(!e.attrsMap[":slot"]&&!e.attrsMap["v-bind:slot"]),"template"===e.tag||e.slotScope||Nr(e,"slot",n,function(e,t){return e.rawAttrsMap[":"+t]||e.rawAttrsMap["v-bind:"+t]||e.rawAttrsMap[t]}(e,"slot")));if("template"===e.tag){var r=Pr(e,ia);if(r){var i=va(r),o=i.name,a=i.dynamic;e.slotTarget=o,e.slotTargetDynamic=a,e.slotScope=r.value||ca}}else{var s=Pr(e,ia);if(s){var c=e.scopedSlots||(e.scopedSlots={}),u=va(s),l=u.name,f=u.dynamic,p=c[l]=ua("template",[],e);p.slotTarget=l,p.slotTargetDynamic=f,p.children=e.children.filter(function(e){if(!e.slotScope)return e.parent=p,!0}),p.slotScope=s.value||ca,e.children=[],e.plain=!1}}}(e),function(e){"slot"===e.tag&&(e.slotName=Ir(e,"name"))}(e),function(e){var t;(t=Ir(e,"is"))&&(e.component=t);null!=Fr(e,"inline-template")&&(e.inlineTemplate=!0)}(e);for(var i=0;i<zo.length;i++)e=zo[i](e,t)||e;return function(e){var t,n,r,i,o,a,s,c,u=e.attrsList;for(t=0,n=u.length;t<n;t++)if(r=i=u[t].name,o=u[t].value,Go.test(r))if(e.hasBindings=!0,(a=ha(r.replace(Go,"")))&&(r=r.replace(ra,"")),na.test(r))r=r.replace(na,""),o=Ar(o),(c=ea.test(r))&&(r=r.slice(1,-1)),a&&(a.prop&&!c&&"innerHtml"===(r=b(r))&&(r="innerHTML"),a.camel&&!c&&(r=b(r)),a.sync&&(s=Br(o,"$event"),c?Mr(e,'"update:"+('+r+")",s,null,!1,0,u[t],!0):(Mr(e,"update:"+b(r),s,null,!1,0,u[t]),C(r)!==b(r)&&Mr(e,"update:"+C(r),s,null,!1,0,u[t])))),a&&a.prop||!e.component&&qo(e.tag,e.attrsMap.type,r)?Er(e,r,o,u[t],c):Nr(e,r,o,u[t],c);else if(Zo.test(r))r=r.replace(Zo,""),(c=ea.test(r))&&(r=r.slice(1,-1)),Mr(e,r,o,a,!1,0,u[t],c);else{var l=(r=r.replace(Go,"")).match(ta),f=l&&l[1];c=!1,f&&(r=r.slice(0,-(f.length+1)),ea.test(f)&&(f=f.slice(1,-1),c=!0)),Dr(e,r,i,o,f,c,a,u[t])}else Nr(e,r,JSON.stringify(o),u[t]),!e.component&&"muted"===r&&qo(e.tag,e.attrsMap.type,r)&&Er(e,r,"true",u[t])}(e),e}function pa(e){var t;if(t=Fr(e,"v-for")){var n=function(e){var t=e.match(Xo);if(!t)return;var n={};n.for=t[2].trim();var r=t[1].trim().replace(Qo,""),i=r.match(Yo);i?(n.alias=r.replace(Yo,"").trim(),n.iterator1=i[1].trim(),i[2]&&(n.iterator2=i[2].trim())):n.alias=r;return n}(t);n&&A(e,n)}}function da(e,t){e.ifConditions||(e.ifConditions=[]),e.ifConditions.push(t)}function va(e){var t=e.name.replace(ia,"");return t||"#"!==e.name[0]&&(t="default"),ea.test(t)?{name:t.slice(1,-1),dynamic:!0}:{name:'"'+t+'"',dynamic:!1}}function ha(e){var t=e.match(ra);if(t){var n={};return t.forEach(function(e){n[e.slice(1)]=!0}),n}}function ma(e){for(var t={},n=0,r=e.length;n<r;n++)t[e[n].name]=e[n].value;return t}var ya=/^xmlns:NS\d+/,ga=/^NS\d+:/;function _a(e){return ua(e.tag,e.attrsList.slice(),e.parent)}var ba=[mo,go,{preTransformNode:function(e,t){if("input"===e.tag){var n,r=e.attrsMap;if(!r["v-model"])return;if((r[":type"]||r["v-bind:type"])&&(n=Ir(e,"type")),r.type||n||!r["v-bind"]||(n="("+r["v-bind"]+").type"),n){var i=Fr(e,"v-if",!0),o=i?"&&("+i+")":"",a=null!=Fr(e,"v-else",!0),s=Fr(e,"v-else-if",!0),c=_a(e);pa(c),jr(c,"type","checkbox"),fa(c,t),c.processed=!0,c.if="("+n+")==='checkbox'"+o,da(c,{exp:c.if,block:c});var u=_a(e);Fr(u,"v-for",!0),jr(u,"type","radio"),fa(u,t),da(c,{exp:"("+n+")==='radio'"+o,block:u});var l=_a(e);return Fr(l,"v-for",!0),jr(l,":type",n),fa(l,t),da(c,{exp:i,block:l}),a?c.else=!0:s&&(c.elseif=s),c}}}}];var $a,wa,Ca={expectHTML:!0,modules:ba,directives:{model:function(e,t,n){var r=t.value,i=t.modifiers,o=e.tag,a=e.attrsMap.type;if(e.component)return Hr(e,r,i),!1;if("select"===o)!function(e,t,n){var r='var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(n&&n.number?"_n(val)":"val")+"});";r=r+" "+Br(t,"$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),Mr(e,"change",r,null,!0)}(e,r,i);else if("input"===o&&"checkbox"===a)!function(e,t,n){var r=n&&n.number,i=Ir(e,"value")||"null",o=Ir(e,"true-value")||"true",a=Ir(e,"false-value")||"false";Er(e,"checked","Array.isArray("+t+")?_i("+t+","+i+")>-1"+("true"===o?":("+t+")":":_q("+t+","+o+")")),Mr(e,"change","var $$a="+t+",$$el=$event.target,$$c=$$el.checked?("+o+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+Br(t,"$$a.concat([$$v])")+")}else{$$i>-1&&("+Br(t,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+Br(t,"$$c")+"}",null,!0)}(e,r,i);else if("input"===o&&"radio"===a)!function(e,t,n){var r=n&&n.number,i=Ir(e,"value")||"null";Er(e,"checked","_q("+t+","+(i=r?"_n("+i+")":i)+")"),Mr(e,"change",Br(t,i),null,!0)}(e,r,i);else if("input"===o||"textarea"===o)!function(e,t,n){var r=e.attrsMap.type,i=n||{},o=i.lazy,a=i.number,s=i.trim,c=!o&&"range"!==r,u=o?"change":"range"===r?Wr:"input",l="$event.target.value";s&&(l="$event.target.value.trim()"),a&&(l="_n("+l+")");var f=Br(t,l);c&&(f="if($event.target.composing)return;"+f),Er(e,"value","("+t+")"),Mr(e,u,f,null,!0),(s||a)&&Mr(e,"blur","$forceUpdate()")}(e,r,i);else if(!F.isReservedTag(o))return Hr(e,r,i),!1;return!0},text:function(e,t){t.value&&Er(e,"textContent","_s("+t.value+")",t)},html:function(e,t){t.value&&Er(e,"innerHTML","_s("+t.value+")",t)}},isPreTag:function(e){return"pre"===e},isUnaryTag:bo,mustUseProp:jn,canBeLeftOpenTag:$o,isReservedTag:Wn,getTagNamespace:Zn,staticKeys:function(e){return e.reduce(function(e,t){return e.concat(t.staticKeys||[])},[]).join(",")}(ba)},xa=g(function(e){return p("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(e?","+e:""))});function ka(e,t){e&&($a=xa(t.staticKeys||""),wa=t.isReservedTag||T,function e(t){t.static=function(e){if(2===e.type)return!1;if(3===e.type)return!0;return!(!e.pre&&(e.hasBindings||e.if||e.for||d(e.tag)||!wa(e.tag)||function(e){for(;e.parent;){if("template"!==(e=e.parent).tag)return!1;if(e.for)return!0}return!1}(e)||!Object.keys(e).every($a)))}(t);if(1===t.type){if(!wa(t.tag)&&"slot"!==t.tag&&null==t.attrsMap["inline-template"])return;for(var n=0,r=t.children.length;n<r;n++){var i=t.children[n];e(i),i.static||(t.static=!1)}if(t.ifConditions)for(var o=1,a=t.ifConditions.length;o<a;o++){var s=t.ifConditions[o].block;e(s),s.static||(t.static=!1)}}}(e),function e(t,n){if(1===t.type){if((t.static||t.once)&&(t.staticInFor=n),t.static&&t.children.length&&(1!==t.children.length||3!==t.children[0].type))return void(t.staticRoot=!0);if(t.staticRoot=!1,t.children)for(var r=0,i=t.children.length;r<i;r++)e(t.children[r],n||!!t.for);if(t.ifConditions)for(var o=1,a=t.ifConditions.length;o<a;o++)e(t.ifConditions[o].block,n)}}(e,!1))}var Aa=/^([\w$_]+|\([^)]*?\))\s*=>|^function(?:\s+[\w$]+)?\s*\(/,Oa=/\([^)]*?\);*$/,Sa=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,Ta={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},Ea={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},Na=function(e){return"if("+e+")return null;"},ja={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Na("$event.target !== $event.currentTarget"),ctrl:Na("!$event.ctrlKey"),shift:Na("!$event.shiftKey"),alt:Na("!$event.altKey"),meta:Na("!$event.metaKey"),left:Na("'button' in $event && $event.button !== 0"),middle:Na("'button' in $event && $event.button !== 1"),right:Na("'button' in $event && $event.button !== 2")};function Da(e,t){var n=t?"nativeOn:":"on:",r="",i="";for(var o in e){var a=La(e[o]);e[o]&&e[o].dynamic?i+=o+","+a+",":r+='"'+o+'":'+a+","}return r="{"+r.slice(0,-1)+"}",i?n+"_d("+r+",["+i.slice(0,-1)+"])":n+r}function La(e){if(!e)return"function(){}";if(Array.isArray(e))return"["+e.map(function(e){return La(e)}).join(",")+"]";var t=Sa.test(e.value),n=Aa.test(e.value),r=Sa.test(e.value.replace(Oa,""));if(e.modifiers){var i="",o="",a=[];for(var s in e.modifiers)if(ja[s])o+=ja[s],Ta[s]&&a.push(s);else if("exact"===s){var c=e.modifiers;o+=Na(["ctrl","shift","alt","meta"].filter(function(e){return!c[e]}).map(function(e){return"$event."+e+"Key"}).join("||"))}else a.push(s);return a.length&&(i+=function(e){return"if(!$event.type.indexOf('key')&&"+e.map(Ma).join("&&")+")return null;"}(a)),o&&(i+=o),"function($event){"+i+(t?"return "+e.value+"($event)":n?"return ("+e.value+")($event)":r?"return "+e.value:e.value)+"}"}return t||n?e.value:"function($event){"+(r?"return "+e.value:e.value)+"}"}function Ma(e){var t=parseInt(e,10);if(t)return"$event.keyCode!=="+t;var n=Ta[e],r=Ea[e];return"_k($event.keyCode,"+JSON.stringify(e)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(r)+")"}var Ia={on:function(e,t){e.wrapListeners=function(e){return"_g("+e+","+t.value+")"}},bind:function(e,t){e.wrapData=function(n){return"_b("+n+",'"+e.tag+"',"+t.value+","+(t.modifiers&&t.modifiers.prop?"true":"false")+(t.modifiers&&t.modifiers.sync?",true":"")+")"}},cloak:S},Fa=function(e){this.options=e,this.warn=e.warn||Sr,this.transforms=Tr(e.modules,"transformCode"),this.dataGenFns=Tr(e.modules,"genData"),this.directives=A(A({},Ia),e.directives);var t=e.isReservedTag||T;this.maybeComponent=function(e){return!!e.component||!t(e.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function Pa(e,t){var n=new Fa(t);return{render:"with(this){return "+(e?Ra(e,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function Ra(e,t){if(e.parent&&(e.pre=e.pre||e.parent.pre),e.staticRoot&&!e.staticProcessed)return Ha(e,t);if(e.once&&!e.onceProcessed)return Ba(e,t);if(e.for&&!e.forProcessed)return za(e,t);if(e.if&&!e.ifProcessed)return Ua(e,t);if("template"!==e.tag||e.slotTarget||t.pre){if("slot"===e.tag)return function(e,t){var n=e.slotName||'"default"',r=qa(e,t),i="_t("+n+(r?","+r:""),o=e.attrs||e.dynamicAttrs?Ga((e.attrs||[]).concat(e.dynamicAttrs||[]).map(function(e){return{name:b(e.name),value:e.value,dynamic:e.dynamic}})):null,a=e.attrsMap["v-bind"];!o&&!a||r||(i+=",null");o&&(i+=","+o);a&&(i+=(o?"":",null")+","+a);return i+")"}(e,t);var n;if(e.component)n=function(e,t,n){var r=t.inlineTemplate?null:qa(t,n,!0);return"_c("+e+","+Va(t,n)+(r?","+r:"")+")"}(e.component,e,t);else{var r;(!e.plain||e.pre&&t.maybeComponent(e))&&(r=Va(e,t));var i=e.inlineTemplate?null:qa(e,t,!0);n="_c('"+e.tag+"'"+(r?","+r:"")+(i?","+i:"")+")"}for(var o=0;o<t.transforms.length;o++)n=t.transforms[o](e,n);return n}return qa(e,t)||"void 0"}function Ha(e,t){e.staticProcessed=!0;var n=t.pre;return e.pre&&(t.pre=e.pre),t.staticRenderFns.push("with(this){return "+Ra(e,t)+"}"),t.pre=n,"_m("+(t.staticRenderFns.length-1)+(e.staticInFor?",true":"")+")"}function Ba(e,t){if(e.onceProcessed=!0,e.if&&!e.ifProcessed)return Ua(e,t);if(e.staticInFor){for(var n="",r=e.parent;r;){if(r.for){n=r.key;break}r=r.parent}return n?"_o("+Ra(e,t)+","+t.onceId+++","+n+")":Ra(e,t)}return Ha(e,t)}function Ua(e,t,n,r){return e.ifProcessed=!0,function e(t,n,r,i){if(!t.length)return i||"_e()";var o=t.shift();return o.exp?"("+o.exp+")?"+a(o.block)+":"+e(t,n,r,i):""+a(o.block);function a(e){return r?r(e,n):e.once?Ba(e,n):Ra(e,n)}}(e.ifConditions.slice(),t,n,r)}function za(e,t,n,r){var i=e.for,o=e.alias,a=e.iterator1?","+e.iterator1:"",s=e.iterator2?","+e.iterator2:"";return e.forProcessed=!0,(r||"_l")+"(("+i+"),function("+o+a+s+"){return "+(n||Ra)(e,t)+"})"}function Va(e,t){var n="{",r=function(e,t){var n=e.directives;if(!n)return;var r,i,o,a,s="directives:[",c=!1;for(r=0,i=n.length;r<i;r++){o=n[r],a=!0;var u=t.directives[o.name];u&&(a=!!u(e,o,t.warn)),a&&(c=!0,s+='{name:"'+o.name+'",rawName:"'+o.rawName+'"'+(o.value?",value:("+o.value+"),expression:"+JSON.stringify(o.value):"")+(o.arg?",arg:"+(o.isDynamicArg?o.arg:'"'+o.arg+'"'):"")+(o.modifiers?",modifiers:"+JSON.stringify(o.modifiers):"")+"},")}if(c)return s.slice(0,-1)+"]"}(e,t);r&&(n+=r+","),e.key&&(n+="key:"+e.key+","),e.ref&&(n+="ref:"+e.ref+","),e.refInFor&&(n+="refInFor:true,"),e.pre&&(n+="pre:true,"),e.component&&(n+='tag:"'+e.tag+'",');for(var i=0;i<t.dataGenFns.length;i++)n+=t.dataGenFns[i](e);if(e.attrs&&(n+="attrs:"+Ga(e.attrs)+","),e.props&&(n+="domProps:"+Ga(e.props)+","),e.events&&(n+=Da(e.events,!1)+","),e.nativeEvents&&(n+=Da(e.nativeEvents,!0)+","),e.slotTarget&&!e.slotScope&&(n+="slot:"+e.slotTarget+","),e.scopedSlots&&(n+=function(e,t,n){var r=e.for||Object.keys(t).some(function(e){var n=t[e];return n.slotTargetDynamic||n.if||n.for||Ka(n)}),i=!!e.if;if(!r)for(var o=e.parent;o;){if(o.slotScope&&o.slotScope!==ca||o.for){r=!0;break}o.if&&(i=!0),o=o.parent}var a=Object.keys(t).map(function(e){return Ja(t[e],n)}).join(",");return"scopedSlots:_u(["+a+"]"+(r?",null,true":"")+(!r&&i?",null,false,"+function(e){var t=5381,n=e.length;for(;n;)t=33*t^e.charCodeAt(--n);return t>>>0}(a):"")+")"}(e,e.scopedSlots,t)+","),e.model&&(n+="model:{value:"+e.model.value+",callback:"+e.model.callback+",expression:"+e.model.expression+"},"),e.inlineTemplate){var o=function(e,t){var n=e.children[0];if(n&&1===n.type){var r=Pa(n,t.options);return"inlineTemplate:{render:function(){"+r.render+"},staticRenderFns:["+r.staticRenderFns.map(function(e){return"function(){"+e+"}"}).join(",")+"]}"}}(e,t);o&&(n+=o+",")}return n=n.replace(/,$/,"")+"}",e.dynamicAttrs&&(n="_b("+n+',"'+e.tag+'",'+Ga(e.dynamicAttrs)+")"),e.wrapData&&(n=e.wrapData(n)),e.wrapListeners&&(n=e.wrapListeners(n)),n}function Ka(e){return 1===e.type&&("slot"===e.tag||e.children.some(Ka))}function Ja(e,t){var n=e.attrsMap["slot-scope"];if(e.if&&!e.ifProcessed&&!n)return Ua(e,t,Ja,"null");if(e.for&&!e.forProcessed)return za(e,t,Ja);var r=e.slotScope===ca?"":String(e.slotScope),i="function("+r+"){return "+("template"===e.tag?e.if&&n?"("+e.if+")?"+(qa(e,t)||"undefined")+":undefined":qa(e,t)||"undefined":Ra(e,t))+"}",o=r?"":",proxy:true";return"{key:"+(e.slotTarget||'"default"')+",fn:"+i+o+"}"}function qa(e,t,n,r,i){var o=e.children;if(o.length){var a=o[0];if(1===o.length&&a.for&&"template"!==a.tag&&"slot"!==a.tag){var s=n?t.maybeComponent(a)?",1":",0":"";return""+(r||Ra)(a,t)+s}var c=n?function(e,t){for(var n=0,r=0;r<e.length;r++){var i=e[r];if(1===i.type){if(Wa(i)||i.ifConditions&&i.ifConditions.some(function(e){return Wa(e.block)})){n=2;break}(t(i)||i.ifConditions&&i.ifConditions.some(function(e){return t(e.block)}))&&(n=1)}}return n}(o,t.maybeComponent):0,u=i||Za;return"["+o.map(function(e){return u(e,t)}).join(",")+"]"+(c?","+c:"")}}function Wa(e){return void 0!==e.for||"template"===e.tag||"slot"===e.tag}function Za(e,t){return 1===e.type?Ra(e,t):3===e.type&&e.isComment?(r=e,"_e("+JSON.stringify(r.text)+")"):"_v("+(2===(n=e).type?n.expression:Xa(JSON.stringify(n.text)))+")";var n,r}function Ga(e){for(var t="",n="",r=0;r<e.length;r++){var i=e[r],o=Xa(i.value);i.dynamic?n+=i.name+","+o+",":t+='"'+i.name+'":'+o+","}return t="{"+t.slice(0,-1)+"}",n?"_d("+t+",["+n.slice(0,-1)+"])":t}function Xa(e){return e.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}new RegExp("\\b"+"do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b")+"\\b");function Ya(e,t){try{return new Function(e)}catch(n){return t.push({err:n,code:e}),S}}function Qa(e){var t=Object.create(null);return function(n,r,i){(r=A({},r)).warn;delete r.warn;var o=r.delimiters?String(r.delimiters)+n:n;if(t[o])return t[o];var a=e(n,r),s={},c=[];return s.render=Ya(a.render,c),s.staticRenderFns=a.staticRenderFns.map(function(e){return Ya(e,c)}),t[o]=s}}var es,ts,ns=(es=function(e,t){var n=la(e.trim(),t);!1!==t.optimize&&ka(n,t);var r=Pa(n,t);return{ast:n,render:r.render,staticRenderFns:r.staticRenderFns}},function(e){function t(t,n){var r=Object.create(e),i=[],o=[];if(n)for(var a in n.modules&&(r.modules=(e.modules||[]).concat(n.modules)),n.directives&&(r.directives=A(Object.create(e.directives||null),n.directives)),n)"modules"!==a&&"directives"!==a&&(r[a]=n[a]);r.warn=function(e,t,n){(n?o:i).push(e)};var s=es(t.trim(),r);return s.errors=i,s.tips=o,s}return{compile:t,compileToFunctions:Qa(t)}})(Ca),rs=(ns.compile,ns.compileToFunctions);function is(e){return(ts=ts||document.createElement("div")).innerHTML=e?'<a href="\n"/>':'<div a="\n"/>',ts.innerHTML.indexOf(" ")>0}var os=!!z&&is(!1),as=!!z&&is(!0),ss=g(function(e){var t=Yn(e);return t&&t.innerHTML}),cs=wn.prototype.$mount;return wn.prototype.$mount=function(e,t){if((e=e&&Yn(e))===document.body||e===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=ss(r));else{if(!r.nodeType)return this;r=r.innerHTML}else e&&(r=function(e){if(e.outerHTML)return e.outerHTML;var t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}(e));if(r){var i=rs(r,{outputSourceRange:!1,shouldDecodeNewlines:os,shouldDecodeNewlinesForHref:as,delimiters:n.delimiters,comments:n.comments},this),o=i.render,a=i.staticRenderFns;n.render=o,n.staticRenderFns=a}}return cs.call(this,e,t)},wn.compile=rs,wn});
vendor: 1,874 bytes, lines 6534-6541
6534; 6535/* AUTOGENERATED: vuex.min.js */ 6536/*! 6537 * vuex v3.6.2 6538 * (c) 2021 Evan You 6539 * @license MIT 6540 */ 6541!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Vuex=e()}(this,(function(){"use strict";var t=("undefined"!=typeof window?window:"undefined"!=typeof global?global:{}).__VUE_DEVTOOLS_GLOBAL_HOOK__;function e(t,n){if(void 0===n&&(n=[]),null===t||"object"!=typeof t)return t;var o,r=(o=function(e){return e.original===t},n.filter(o)[0]);if(r)return r.copy;var i=Array.isArray(t)?[]:{};return n.push({original:t,copy:i}),Object.keys(t).forEach((function(o){i[o]=e(t[o],n)})),i}function n(t,e){Object.keys(t).forEach((function(n){return e(t[n],n)}))}function o(t){return null!==t&&"object"==typeof t}var r=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var n=t.state;this.state=("function"==typeof n?n():n)||{}},i={namespaced:{configurable:!0}};i.namespaced.get=function(){return!!this._rawModule.namespaced},r.prototype.addChild=function(t,e){this._children[t]=e},r.prototype.removeChild=function(t){delete this._children[t]},r.prototype.getChild=function(t){return this._children[t]},r.prototype.hasChild=function(t){return t in this._children},r.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},r.prototype.forEachChild=function(t){n(this._children,t)},r.prototype.forEachGetter=function(t){this._rawModule.getters&&n(this._rawModule.getters,t)},r.prototype.forEachAction=function(t){this._rawModule.actions&&n(this._rawModule.actions,t)},r.prototype.forEachMutation=function(t){this._rawModule.mutations&&n(this._rawModule.mutations,t)}
vendor: 10,781 bytes, lines 6541-6544
6541,Object.defineProperties(r.prototype,i);var c,a=function(t){this.register([],t,!1)};a.prototype.get=function(t){return t.reduce((function(t,e){return t.getChild(e)}),this.root)},a.prototype.getNamespace=function(t){var e=this.root;return t.reduce((function(t,n){return t+((e=e.getChild(n)).namespaced?n+"/":"")}),"")},a.prototype.update=function(t){!function t(e,n,o){if(n.update(o),o.modules)for(var r in o.modules){if(!n.getChild(r))return;t(e.concat(r),n.getChild(r),o.modules[r])}}([],this.root,t)},a.prototype.register=function(t,e,o){var i=this;void 0===o&&(o=!0);var c=new r(e,o);0===t.length?this.root=c:this.get(t.slice(0,-1)).addChild(t[t.length-1],c);e.modules&&n(e.modules,(function(e,n){i.register(t.concat(n),e,o)}))},a.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1],o=e.getChild(n);o&&o.runtime&&e.removeChild(n)},a.prototype.isRegistered=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];return!!e&&e.hasChild(n)};var s=function(e){var n=this;void 0===e&&(e={}),!c&&"undefined"!=typeof window&&window.Vue&&v(window.Vue);var o=e.plugins;void 0===o&&(o=[]);var r=e.strict;void 0===r&&(r=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new a(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new c,this._makeLocalGettersCache=Object.create(null);var i=this,s=this.dispatch,u=this.commit;this.dispatch=function(t,e){return s.call(i,t,e)},this.commit=function(t,e,n){return u.call(i,t,e,n)},this.strict=r;var f=this._modules.root.state;p(this,f,[],this._modules.root),h(this,f),o.forEach((function(t){return t(n)})),(void 0!==e.devtools?e.devtools:c.config.devtools)&&function(e){t&&(e._devtoolHook=t,t.emit("vuex:init",e),t.on("vuex:travel-to-state",(function(t){e.replaceState(t)})),e.subscribe((function(e,n){t.emit("vuex:mutation",e,n)}),{prepend:!0}),e.subscribeAction((function(e,n){t.emit("vuex:action",e,n)}),{prepend:!0}))}(this)},u={state:{configurable:!0}};function f(t,e,n){return e.indexOf(t)<0&&(n&&n.prepend?e.unshift(t):e.push(t)),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function l(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;p(t,n,[],t._modules.root,!0),h(t,n,e)}function h(t,e,o){var r=t._vm;t.getters={},t._makeLocalGettersCache=Object.create(null);var i=t._wrappedGetters,a={};n(i,(function(e,n){a[n]=function(t,e){return function(){return t(e)}}(e,t),Object.defineProperty(t.getters,n,{get:function(){return t._vm[n]},enumerable:!0})}));var s=c.config.silent;c.config.silent=!0,t._vm=new c({data:{$$state:e},computed:a}),c.config.silent=s,t.strict&&function(t){t._vm.$watch((function(){return this._data.$$state}),(function(){}),{deep:!0,sync:!0})}(t),r&&(o&&t._withCommit((function(){r._data.$$state=null})),c.nextTick((function(){return r.$destroy()})))}function p(t,e,n,o,r){var i=!n.length,a=t._modules.getNamespace(n);if(o.namespaced&&(t._modulesNamespaceMap[a],t._modulesNamespaceMap[a]=o),!i&&!r){var s=d(e,n.slice(0,-1)),u=n[n.length-1];t._withCommit((function(){c.set(s,u,o.state)}))}var f=o.context=function(t,e,n){var o=""===e,r={dispatch:o?t.dispatch:function(n,o,r){var i=m(n,o,r),c=i.payload,a=i.options,s=i.type;return a&&a.root||(s=e+s),t.dispatch(s,c)},commit:o?t.commit:function(n,o,r){var i=m(n,o,r),c=i.payload,a=i.options,s=i.type;a&&a.root||(s=e+s),t.commit(s,c,a)}};return Object.defineProperties(r,{getters:{get:o?function(){return t.getters}:function(){return function(t,e){if(!t._makeLocalGettersCache[e]){var n={},o=e.length;Object.keys(t.getters).forEach((function(r){if(r.slice(0,o)===e){var i=r.slice(o);Object.defineProperty(n,i,{get:function(){return t.getters[r]},enumerable:!0})}})),t._makeLocalGettersCache[e]=n}return t._makeLocalGettersCache[e]}(t,e)}},state:{get:function(){return d(t.state,n)}}}),r}(t,a,n);o.forEachMutation((function(e,n){!function(t,e,n,o){(t._mutations[e]||(t._mutations[e]=[])).push((function(e){n.call(t,o.state,e)}))}(t,a+n,e,f)})),o.forEachAction((function(e,n){var o=e.root?n:a+n,r=e.handler||e;!function(t,e,n,o){(t._actions[e]||(t._actions[e]=[])).push((function(e){var r,i=n.call(t,{dispatch:o.dispatch,commit:o.commit,getters:o.getters,state:o.state,rootGetters:t.getters,rootState:t.state},e);return(r=i)&&"function"==typeof r.then||(i=Promise.resolve(i)),t._devtoolHook?i.catch((function(e){throw t._devtoolHook.emit("vuex:error",e),e})):i}))}(t,o,r,f)})),o.forEachGetter((function(e,n){!function(t,e,n,o){if(t._wrappedGetters[e])return;t._wrappedGetters[e]=function(t){return n(o.state,o.getters,t.state,t.getters)}}(t,a+n,e,f)})),o.forEachChild((function(o,i){p(t,e,n.concat(i),o,r)}))}function d(t,e){return e.reduce((function(t,e){return t[e]}),t)}function m(t,e,n){return o(t)&&t.type&&(n=e,e=t,t=t.type),{type:t,payload:e,options:n}}function v(t){c&&t===c||function(t){if(Number(t.version.split(".")[0])>=2)t.mixin({beforeCreate:n});else{var e=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[n].concat(t.init):n,e.call(this,t)}}function n(){var t=this.$options;t.store?this.$store="function"==typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}}(c=t)}u.state.get=function(){return this._vm._data.$$state},u.state.set=function(t){},s.prototype.commit=function(t,e,n){var o=this,r=m(t,e,n),i=r.type,c=r.payload,a={type:i,payload:c},s=this._mutations[i];s&&(this._withCommit((function(){s.forEach((function(t){t(c)}))})),this._subscribers.slice().forEach((function(t){return t(a,o.state)})))},s.prototype.dispatch=function(t,e){var n=this,o=m(t,e),r=o.type,i=o.payload,c={type:r,payload:i},a=this._actions[r];if(a){try{this._actionSubscribers.slice().filter((function(t){return t.before})).forEach((function(t){return t.before(c,n.state)}))}catch(t){}var s=a.length>1?Promise.all(a.map((function(t){return t(i)}))):a[0](i);return new Promise((function(t,e){s.then((function(e){try{n._actionSubscribers.filter((function(t){return t.after})).forEach((function(t){return t.after(c,n.state)}))}catch(t){}t(e)}),(function(t){try{n._actionSubscribers.filter((function(t){return t.error})).forEach((function(e){return e.error(c,n.state,t)}))}catch(t){}e(t)}))}))}},s.prototype.subscribe=function(t,e){return f(t,this._subscribers,e)},s.prototype.subscribeAction=function(t,e){return f("function"==typeof t?{before:t}:t,this._actionSubscribers,e)},s.prototype.watch=function(t,e,n){var o=this;return this._watcherVM.$watch((function(){return t(o.state,o.getters)}),e,n)},s.prototype.replaceState=function(t){var e=this;this._withCommit((function(){e._vm._data.$$state=t}))},s.prototype.registerModule=function(t,e,n){void 0===n&&(n={}),"string"==typeof t&&(t=[t]),this._modules.register(t,e),p(this,this.state,t,this._modules.get(t),n.preserveState),h(this,this.state)},s.prototype.unregisterModule=function(t){var e=this;"string"==typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit((function(){var n=d(e.state,t.slice(0,-1));c.delete(n,t[t.length-1])})),l(this)},s.prototype.hasModule=function(t){return"string"==typeof t&&(t=[t]),this._modules.isRegistered(t)},s.prototype.hotUpdate=function(t){this._modules.update(t),l(this,!0)},s.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(s.prototype,u);var g=M((function(t,e){var n={};return w(e).forEach((function(e){var o=e.key,r=e.val;n[o]=function(){var e=this.$store.state,n=this.$store.getters;if(t){var o=$(this.$store,"mapState",t);if(!o)return;e=o.context.state,n=o.context.getters}return"function"==typeof r?r.call(this,e,n):e[r]},n[o].vuex=!0})),n})),y=M((function(t,e){var n={};return w(e).forEach((function(e){var o=e.key,r=e.val;n[o]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var o=this.$store.commit;if(t){var i=$(this.$store,"mapMutations",t);if(!i)return;o=i.context.commit}return"function"==typeof r?r.apply(this,[o].concat(e)):o.apply(this.$store,[r].concat(e))}})),n})),_=M((function(t,e){var n={};return w(e).forEach((function(e){var o=e.key,r=e.val;r=t+r,n[o]=function(){if(!t||$(this.$store,"mapGetters",t))return this.$store.getters[r]},n[o].vuex=!0})),n})),b=M((function(t,e){var n={};return w(e).forEach((function(e){var o=e.key,r=e.val;n[o]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var o=this.$store.dispatch;if(t){var i=$(this.$store,"mapActions",t);if(!i)return;o=i.context.dispatch}return"function"==typeof r?r.apply(this,[o].concat(e)):o.apply(this.$store,[r].concat(e))}})),n}));function w(t){return function(t){return Array.isArray(t)||o(t)}(t)?Array.isArray(t)?t.map((function(t){return{key:t,val:t}})):Object.keys(t).map((function(e){return{key:e,val:t[e]}})):[]}function M(t){return function(e,n){return"string"!=typeof e?(n=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,n)}}function $(t,e,n){return t._modulesNamespaceMap[n]}function C(t,e,n){var o=n?t.groupCollapsed:t.group;try{o.call(t,e)}catch(n){t.log(e)}}function E(t){try{t.groupEnd()}catch(e){t.log("ââ log end ââ")}}function O(){var t=new Date;return" @ "+j(t.getHours(),2)+":"+j(t.getMinutes(),2)+":"+j(t.getSeconds(),2)+"."+j(t.getMilliseconds(),3)}function j(t,e){return n="0",o=e-t.toString().length,new Array(o+1).join(n)+t;var n,o}return{Store:s,install:v,version:"3.6.2",mapState:g,mapMutations:y,mapGetters:_,mapActions:b,createNamespacedHelpers:function(t){return{mapState:g.bind(null,t),mapGetters:_.bind(null,t),mapMutations:y.bind(null,t),mapActions:b.bind(null,t)}},createLogger:function(t){void 0===t&&(t={});var n=t.collapsed;void 0===n&&(n=!0);var o=t.filter;void 0===o&&(o=function(t,e,n){return!0});var r=t.transformer;void 0===r&&(r=function(t){return t});var i=t.mutationTransformer;void 0===i&&(i=function(t){return t});var c=t.actionFilter;void 0===c&&(c=function(t,e){return!0});var a=t.actionTransformer;void 0===a&&(a=function(t){return t});var s=t.logMutations;void 0===s&&(s=!0);var u=t.logActions;void 0===u&&(u=!0);var f=t.logger;return void 0===f&&(f=console),function(t){var l=e(t.state);void 0!==f&&(s&&t.subscribe((function(t,c){var a=e(c);if(o(t,l,a)){var s=O(),u=i(t),h="mutation "+t.type+s;C(f,h,n),f.log("%c prev state","color: #9E9E9E; font-weight: bold",r(l)),f.log("%c mutation","color: #03A9F4; font-weight: bold",u),f.log("%c next state","color: #4CAF50; font-weight: bold",r(a)),E(f)}l=a})),u&&t.subscribeAction((function(t,e){if(c(t,e)){var o=O(),r=a(t),i="action "+t.type+o;C(f,i,n),f.log("%c action","color: #03A9F4; font-weight: bold",r),E(f)}})))}}}}));; 6542/* AUTOGENERATED: vue.loadable.js */ 6543(function () { 6544 var initialCompiled = false;
6545 6546 var cache = {}; 6547 6548 var VueLoadableMixin = { 6549 created: function () { 6550 // TODO: This code is unreliable since it's not a part of the public API 6551 Vue.util.defineReactive(this, '$reloading', false); 6552 }, 6553 6554 beforeMount: function () { 6555 if (this.$options.loadable && this.$options.loadable.loadOnCompile && !initialCompiled) { 6556 this.$reload(); 6557 initialCompiled = true; 6558 } 6559 }, 6560 6561 methods: { 6562 $reload: function () { 6563 var loader = this.$options.loadable.loader; 6564 6565 if (loader) { 6566 this.$reloading = true; 6567 var promise; 6568 6569 if (this.$options.loadable.cacheSimultaneous) { 6570 if (!_.has(cache, this._getCacheKey())) { 6571 cache[this._getCacheKey()] = loader.call(this, arguments); 6572 } 6573 promise = cache[this._getCacheKey()]; 6574 } else { 6575 promise = loader.call(this, arguments); 6576 } 6577 6578 if (promise && typeof promise.then === 'function') { 6579 promise.then(this._resolve, this._reject); 6580 } 6581 } 6582 }, 6583 6584 _getCacheKey: function() { 6585 return _.isFunction(this.$options.loadable.cacheKey) 6586 ? this.$options.loadable.cacheKey.apply(this) 6587 : this.$options.name; 6588 }, 6589 6590 _resolve: function (data) { 6591 var uuid = _.uniqueId(); 6592 var self = this; 6593 6594 xcart.bind(['resources.ready', 'resources.empty'], _.bind( 6595 function (event, args) { 6596 if (args.uuid === uuid) { 6597 if (this.$options.loadable.transferState) { 6598 var oldData = JSON.parse(JSON.stringify(this.$data)); 6599 } 6600 6601 if (this.$options.loadable.update !== false) { 6602 this._updateComponent(data); 6603 } 6604 6605 if (this.$options.loadable.transferState) { 6606 // TODO: doesn't work 6607 this.$data = oldData; 6608 } 6609 6610 this.$reloading = false; 6611 6612 if ('function' === typeof(this.$options.loadable.resolve)) { 6613 this.$options.loadable.resolve.apply(this, [data]); 6614 } 6615 6616 delete cache[this._getCacheKey()]; 6617 } 6618 }, 6619 this) 6620 ); 6621 6622 xcart.parsePreloadedLabels(data, uuid); 6623 xcart.parseResources(data, uuid); 6624 }, 6625 6626 _reject: function (data) { 6627 this.$reloading = false; 6628 if ('function' === typeof(this.$options.loadable.reject)) { 6629 this.$options.loadable.reject.apply(this, [data]); 6630 } 6631 6632 delete cache[this._getCacheKey()]; 6633 }, 6634 6635 _updateComponent: function (html) { 6636 var element = this._parseTemplate(html); 6637 // Disable optimization to avoid static roots are not refreshing 6638 this.$options.render = Vue.compile(element.outerHTML, {optimize: false}).render; 6639 6640 var update = typeof(this.$options.loadable.update) === 'function' 6641 ? this.$options.loadable.update(this) 6642 : this.$options.loadable.update; 6643 6644 // Force "initial render" instead of old vnode update (see Vue.prototype._update implementation) 6645 if (update === true) { 6646 this._vnode = null; 6647 } 6648 6649 this._update(this._render(), false); 6650 }, 6651 6652 _parseTemplate: function (html) { 6653 var element; 6654 6655 if (this.$options.loadable.parser) { 6656 element = this.$options.loadable.parser.apply(this, [html]); 6657 } else { 6658 var temp = document.createElement('div'); 6659 temp.innerHTML = html; 6660 6661 element = temp.querySelector('[is=' + this.$options._componentTag + '] > *'); 6662 if (!element) { 6663 element = temp.querySelector(this.$options._componentTag + ' > *'); 6664 } 6665 } 6666 6667 return element; 6668 } 6669 } 6670 } 6671 6672 if (typeof exports === 'object' && typeof module === 'object') { 6673 module.exports = VueLoadableMixin 6674 } else if(typeof define === 'function' && define.amd) { 6675 define(function () { return VueLoadableMixin }) 6676 } else if (typeof window !== 'undefined') { 6677 window.VueLoadableMixin = VueLoadableMixin 6678 } 6679})(); 6680 6681define('vue/vue.loadable', function () { return VueLoadableMixin; });; 6682/* AUTOGENERATED: vue.registerComponent.js */ 6683(function () { 6684 function install (Vue) { 6685 Vue.registerComponent = function (parent, child, name) { 6686 name = name || child.options.name; 6687 if (typeof(parent) === 'function' && typeof(child) === 'function') { 6688 var record = {}; 6689 record[name] = child; 6690 parent = parent.extend({ 6691 components: _.extend(parent.options.components, record) 6692 }); 6693 } else { 6694 console.groupCollapsed("[vue.registerComponent] error");
6695 console.error('Given argument is not a object constructor'); 6696 console.error(arguments); 6697 console.groupEnd(); 6698 } 6699 } 6700 } 6701 6702 if (typeof exports == "object") { 6703 module.exports = install 6704 } else if (typeof define == "function" && define.amd) { 6705 define([], function(){ return install }) 6706 } else if (window.Vue) { 6707 Vue.use(install) 6708 } 6709})();; 6710/* AUTOGENERATED: vue.js */ 6711/* vim: set ts=2 sw=2 sts=2 et: */ 6712 6713/** 6714 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 6715 * See https://www.x-cart.com/license-agreement.html for license details. 6716 */ 6717 6718define('vue/vue', function () { return Vue; }); 6719 6720if ('undefined' !== typeof(Vuex)) { 6721 Vue.use(Vuex); 6722 define('vue/vuex', function () { return Vuex; }); 6723} 6724 6725define('js/vue/vue', ['vue/vue', 'vue/eventbus', 'js/vue/component'], function (Vue, EventBus, XLiteVueComponent) { 6726 Vue.getClosestVueInstance = function (el) { 6727 var _getClosestVueInstance = function (element) { 6728 if (element) { 6729 return element.__vue__ || _getClosestVueInstance(element.parentElement); 6730 } 6731 } 6732 6733 return _getClosestVueInstance(el); 6734 }; 6735 6736 Vue.directive('data', { 6737 inserted: function (el, binding) { 6738 var vm = Vue.getClosestVueInstance(el); 6739 6740 if (!vm) { 6741 return; 6742 } 6743 6744 var object = binding.value; 6745 for (var key in object) { 6746 var parts = key.replace('[','.').replace(']','').split('.'); 6747 var path = ''; 6748 6749 parts.forEach(function (part) { 6750 if (path) { 6751 path = isNaN(part)
6752 ? path.concat('.' + part) 6753 : path.concat('[' + part + ']'); 6754 } else { 6755 path = part; 6756 } 6757 6758 // TODO: doesn't work since we don't have this/self and $get method anymore 6759 /*if (_.isUndefined(self.vm.$get(path))) { 6760 self.vm.$set(path, {}); 6761 }*/ 6762 }); 6763 6764 if (vm[key] !== undefined) { 6765 vm[key] = object[key]; 6766 } 6767 } 6768 }, 6769 6770 // for loadable components only 6771 update: function (el, binding) { 6772 var vm = Vue.getClosestVueInstance(el); 6773 6774 if (!vm || vm.$options.loadable === undefined) { 6775 return; 6776 } 6777 6778 var object = binding.value; 6779 for (var key in object) { 6780 if (vm.$options.loadable.ignoreUpdates && _.contains(vm.$options.loadable.ignoreUpdates, key)) { 6781 continue; 6782 } 6783 6784 if (vm[key] !== undefined && !_.isEqual(vm[key], object[key])) { 6785 vm[key] = object[key]; 6786 } 6787 } 6788 } 6789 }); 6790 6791 function XLiteVue() { 6792 this.root = null; 6793 } 6794 6795 XLiteVue.prototype.components = {}; 6796 6797 XLiteVue.prototype.start = function (element) { 6798 for (var componentName in this.components) if (this.components.hasOwnProperty(componentName)) { 6799 Vue.component(componentName, this.components[componentName].definition) 6800 } 6801 6802 if (_.isEmpty(this.components)) { 6803 return; 6804 } 6805 6806 var elementToInit = element || '#page-wrapper'; 6807 6808 if (element instanceof jQuery && element.length > 0) { 6809 elementToInit = element.get(0); 6810 } 6811 6812 this.root = new Vue({el: elementToInit}); 6813 6814 Vue.nextTick(function () { 6815 typeof CommonForm !== 'undefined' && CommonForm.autoload(); 6816 typeof StickyPanel !== 'undefined' && StickyPanel.reload(); 6817 xcart.microhandlers.runInitial(); 6818 }); 6819 }; 6820 6821 XLiteVue.prototype.component = function (name, definition) { 6822 if (this.components[name]) { 6823 this.components[name].extend(definition); 6824 } else { 6825 this.components[name] = new XLiteVueComponent(name, definition); 6826 } 6827 6828 return this.components[name].definition; 6829 }; 6830 6831 Vue.prototype.$dispatch = function (event) { 6832 EventBus.$emit.apply(EventBus, arguments); 6833 }; 6834 6835 Vue.prototype.$broadcast = function (event) { 6836 EventBus.$emit.apply(EventBus, arguments); 6837 }; 6838 6839 Vue.mixin({ 6840 created: function () { 6841 if (typeof this.$options.events !== 'undefined') { 6842 var self = this; 6843 for (var eventName in this.$options.events) { 6844 if (this.$options.events.hasOwnProperty(eventName)) { 6845 (function (_eventName) { 6846 EventBus.$on(_eventName, _.bind(function () { 6847 this.$options.events[_eventName].apply(this, arguments); 6848 }, self)); 6849 })(eventName); 6850 } 6851 } 6852 } 6853 }, 6854 6855 mounted: function () { 6856 if (typeof this.$options.ready !== 'undefined') { 6857 this.$nextTick(function () { 6858 this.$options.ready.call(this); 6859 }); 6860 } 6861 }, 6862 }) 6863 6864 return new XLiteVue(); 6865}); 6866 6867jQuery(document).ready(function () { 6868 define('xlite_vue_model_start', ['js/vue/vue', 'ready'], function (XLiteVue) { 6869 if ('admin' === xliteConfig.zone) { 6870 XLiteVue.start(); 6871 } 6872 }); 6873});; 6874/* AUTOGENERATED: component.js */ 6875/* vim: set ts=2 sw=2 sts=2 et: */ 6876 6877/** 6878 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 6879 * See https://www.x-cart.com/license-agreement.html for license details. 6880 */ 6881 6882define('js/vue/component', ['js/underscore', 'vue/vue'], function (_, Vue) { 6883 6884 var XLiteVueComponent = function (name, definition) { 6885 this.name = name; 6886 this.definition = Vue.extend(definition); 6887 }; 6888 6889 XLiteVueComponent.prototype.extend = function (definition) { 6890 this.definition = this.definition.extend(definition); 6891 this._provideParentMethods(); 6892 }; 6893 6894 XLiteVueComponent.prototype._provideParentMethods = function () { 6895 var methods = this.definition.options.methods; 6896 var parent = this.definition.super.options.methods; 6897 6898 for (var methodName in methods) if ('undefined' === typeof(methods.hasOwnProperty) || methods.hasOwnProperty(methodName)) { 6899 if (parent[methodName]) { 6900 methods[methodName].parent = parent[methodName]; 6901 } 6902 } 6903 }; 6904 6905 return XLiteVueComponent; 6906});;
6907/* AUTOGENERATED: event_bus.js */ 6908/* vim: set ts=2 sw=2 sts=2 et: */ 6909 6910/** 6911 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 6912 * See https://www.x-cart.com/license-agreement.html for license details. 6913 */ 6914 6915define('vue/eventbus', ['vue/vue'], function (Vue) { 6916 return new Vue(); 6917});; 6918/* AUTOGENERATED: xcart.popup.js */ 6919/* vim: set ts=2 sw=2 sts=2 et: */ 6920 6921/** 6922 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 6923 * See https://www.x-cart.com/license-agreement.html for license details. 6924 */ 6925 6926var popup = {}; 6927 6928/** 6929 * Properties 6930 */ 6931 6932// Loading status 6933popup.isLoading = false; 6934 6935// Request type status - POST or GET 6936popup.isPostRequest = false; 6937 6938// Current unblock event handler 6939popup.currentUnblockCallback = null; 6940 6941// Current popup 6942popup.currentPopup = null; 6943 6944// Load options 6945popup.loadOptions = null; 6946 6947// Do not do real close popup in popup.close() 6948// popup.pseudoClose = false; 6949 6950/** 6951 * Methods 6952 */ 6953 6954// Load data to popup 6955popup.load = function(url, unblockCallback, timeout) 6956{ 6957 if (_.isObject(unblockCallback) && !_.isFunction(unblockCallback)) { 6958 var options = unblockCallback; 6959 options.unblockCallback = 'undefined' == typeof(options.unblockCallback) ? null : options.unblockCallback; 6960 options.timeout = timeout || null; 6961 6962 } else { 6963 var options = { 6964 'unblockCallback': unblockCallback, 6965 'timeout': timeout 6966 }; 6967 } 6968 6969 this.loadOptions = options; 6970 6971 var result = false;
6972 if (xcart.isRequesterEnabled) { 6973 var method = null; 6974 6975 if (_.isObject(url) && !_.isElement(url)) { 6976 url = url.get(0); 6977 } 6978 6979 if (url.constructor == String) { 6980 method = 'loadByURL'; 6981 6982 } else if (url.constructor == HTMLFormElement) { 6983 method = 'loadByForm'; 6984 6985 } else if (url.constructor == HTMLAnchorElement) { 6986 method = 'loadByLink'; 6987 6988 } else if (url.constructor == HTMLButtonElement) { 6989 method = 'loadByButton'; 6990 6991 } 6992 6993 if (method) { 6994 this.isLoading = true; 6995 this.currentUnblockCallback = options.unblockCallback; 6996 6997 if (this.currentPopup) { 6998 // Reload popup content only 6999 this.shade(); 7000 } else { 7001 // Open waiting dialog 7002 this.openAsWait(); 7003 } 7004 7005 this.isPostRequest = false; 7006 result = this[method](url, options.timeout); 7007 } 7008 } 7009 7010 return result; 7011}; 7012 7013// Load by URL 7014popup.loadByURL = function(url, timeout) 7015{ 7016 return xcart.get( 7017 this.preprocessURL(url), 7018 _.bind(this.postprocessRequest, this), 7019 null, 7020 { 7021 timeout: timeout 7022 } 7023 ); 7024}; 7025 7026// Load by form element 7027popup.loadByForm = function(form) 7028{ 7029 form = jQuery(form).get(0); 7030 7031 form.setAttribute('action', this.preprocessURL(form.getAttribute('action'))); 7032 7033 return form ? form.submitBackground(_.bind(this.postprocessRequest, this)) : false; 7034}; 7035 7036// Load by link element 7037popup.loadByLink = function(link) 7038{ 7039 link = jQuery(link).eq(0); 7040 7041 var href = (1 == link.length && link.attr('href')) ? link.attr('href') : false; 7042 7043 return href 7044 ? xcart.get(this.preprocessURL(href), _.bind(this.postprocessRequest, this)) 7045 : false; 7046}; 7047 7048// Load by button element 7049popup.loadByButton = function(button) 7050{ 7051 var result = false;
7052 7053 button = jQuery(button); 7054 7055 if (button.attr('onclick') && -1 !== button.attr('onclick').toString().search(/\.location[ ]*=[ ]*['"].+['"]/)) { 7056 7057 // By onclick attribute 7058 var m = button.attr('onclick').toString().match(/\.location[ ]*=[ ]*['"](.+)['"]/); 7059 result = xcart.get(this.preprocessURL(m[1]), _.bind(this.postprocessRequest, this)); 7060 7061 } else if (button.data('location')) { 7062 7063 // By kQuery data cell 7064 result = xcart.get(this.preprocessURL(button.data('location')), _.bind(this.postprocessRequest, this)); 7065 7066 } else if (0 < button.parents('form').length) { 7067 7068 // By button's form 7069 result = this.loadByForm(jQuery(button).parents('form').eq(0)); 7070 7071 } 7072 7073 return result; 7074}; 7075 7076// Preprocess URL 7077popup.preprocessURL = function(url) 7078{ 7079 if (url && -1 == url.search(/only_center=1/)) { 7080 url += (-1 == url.search(/\?/) ? '?' : '&') + 'only_center=1'; 7081 } 7082 7083 return url; 7084}; 7085 7086// Postprocess request 7087popup.postprocessRequest = function(XMLHttpRequest, textStatus, data, isValid) 7088{ 7089 if (XMLHttpRequest && XMLHttpRequest instanceof jQuery.Event && textStatus) { 7090 var event = XMLHttpRequest; 7091 XMLHttpRequest = textStatus.XMLHttpRequest; 7092 data = textStatus.data; 7093 isValid = textStatus.isValid; 7094 textStatus = textStatus.textStatus; 7095 } 7096 7097 var responseStatus = 4 == XMLHttpRequest.readyState ? parseInt(XMLHttpRequest.getResponseHeader('ajax-response-status')) : 0; 7098 7099 if (4 != XMLHttpRequest.readyState) { 7100 7101 // Connection failed 7102 this.destroy(); 7103 // TODO - add top message 7104 7105 } else if (278 == responseStatus) { 7106 7107 // Redirect 7108 this.destroy(); 7109 var url = XMLHttpRequest.getResponseHeader('AJAX-Location'); 7110 if (url) { 7111 self.location = url; 7112 7113 } else { 7114 self.location.reload(true); 7115 } 7116 7117 } else if (279 == responseStatus) { 7118 7119 // Internal redirect 7120 var url = XMLHttpRequest.getResponseHeader('AJAX-Location'); 7121 if (url) { 7122 this.load(url, this.currentUnblockCallback); 7123 7124 } else { 7125 self.location.reload(true); 7126 } 7127 7128 } else if (277 == responseStatus) { 7129 7130 // Close popup in silence 7131 this.close(); 7132 7133 } else if (200 == XMLHttpRequest.status) { 7134 7135 // Load new content 7136 this.unshade(); 7137 7138 var uuid = _.uniqueId(); 7139 7140 if (data) { 7141 xcart.bind(['resources.ready', 'resources.empty'], _.bind( 7142 function(event, args){ 7143 if (args.uuid === uuid) { 7144 this.place(data, this.loadOptions); 7145 xcart.trigger( 7146 'afterPopupPlace', 7147 { 7148 'XMLHttpRequest': XMLHttpRequest, 7149 'textStatus': textStatus, 7150 'data': data, 7151 'isValid': isValid 7152 } 7153 ); 7154 } 7155 }, 7156 this) 7157 ); 7158 7159 xcart.parsePreloadedLabels(jQuery.parseHTML(data), uuid); 7160 xcart.parseResources(jQuery.parseHTML(data), uuid); 7161 7162 } else { 7163 this.unfreezePopup(); 7164 } 7165 7166 } else { 7167 7168 // Loading failed 7169 this.close(); 7170 7171 } 7172}; 7173 7174// Place request data 7175popup.place = function(data, options) 7176{ 7177 this.isLoading = false; 7178 7179 if (false !== data) { 7180 data = this.extractRequestData(data); 7181 this.assignHandlers(data); 7182 this.open(data, options); 7183 } 7184}; 7185 7186// Extract widget data 7187popup.extractRequestData = function(data) 7188{ 7189 return jQuery(data); 7190}; 7191 7192popup.assignHandlers = function(data) 7193{ 7194 // Do not need this assignment since the microhandlers would be run after the popup placement 7195 // xcart.microhandlers.runAll(data); 7196}; 7197 7198popup.shade = function() 7199{ 7200 this.currentPopup.widget.find('.ui-dialog-content') 7201 .append('<div class="wait-overlay"><div class="wait-overlay-progress"><div></div></div></div>'); 7202}; 7203 7204popup.unshade = function() 7205{ 7206 if (this.currentPopup) { 7207 this.currentPopup.widget.find('.wait-overlay').remove(); 7208 } 7209}; 7210 7211// Popup post processing 7212popup.postprocess = function() 7213{ 7214 // If for some cases you need direct submit of the form (inside the popup widget) 7215 // then provide the form with the "no-popup-ajax-submit" CSS class 7216 this.currentPopup.widget 7217 .find('form') 7218 .not('.no-popup-ajax-submit') 7219 .commonController(
7220 'enableBackgroundSubmit', 7221 _.bind(this.freezePopup, this), 7222 _.bind(this.postprocessRequest, this) 7223 ); 7224 7225 xcart.microhandlers.runAll(this.currentPopup.widget); 7226 7227 if (!this.isLoading) { 7228 xcart.trigger('popup.postprocess', { widget: this }); 7229 } 7230}; 7231 7232// Freeze popup content 7233popup.freezePopup = function() 7234{ 7235 if (this.currentPopup) { 7236 this.currentPopup.widget.find('form').each( 7237 function() { 7238 jQuery('button,input:image,input:submit', this).each( 7239 function() { 7240 if (!this.disabled) { 7241 this.temporaryDisabled = true; 7242 jQuery(this).prop('disabled', 'disabled'); 7243 } 7244 } 7245 ); 7246 } 7247 ); 7248 7249 this.shade(); 7250 } 7251}; 7252 7253// Unfreeze popup content 7254popup.unfreezePopup = function() 7255{ 7256 if (this.currentPopup) { 7257 this.currentPopup.widget.find('form').each( 7258 function() { 7259 jQuery('button,input:image,input:submit', this).each( 7260 function() { 7261 if (this.temporaryDisabled) { 7262 jQuery(this).removeAttr('disabled'); 7263 this.temporaryDisabled = true; 7264 } 7265 } 7266 ); 7267 } 7268 ); 7269 } 7270}; 7271 7272// Open as wait box 7273popup.openAsWait = function() 7274{ 7275 this.isLoading = true; 7276 this.open(jQuery('<div data-dialog-class="block-wait-box"><div class="block-wait"><div></div></div></div>')); 7277}; 7278 7279// Open-n-display popup 7280popup.open = function(box, additionalOptions) 7281{ 7282 additionalOptions = additionalOptions || {}; 7283 7284 if (this.currentPopup) { 7285 this.destroy(); 7286 } 7287 7288 if (box && _.isString(box)) { 7289 box = jQuery('<div></div>') 7290 .html(box); 7291 } 7292 7293 box = jQuery(box); 7294 if (box.attr('title')) { 7295 box.data('title', box.attr('title')); 7296 additionalOptions.title = box.data('title'); 7297 7298 } else if (box.data('title')) { 7299 box.attr('title', box.data('title')); 7300 additionalOptions.title = box.data('title'); 7301 } 7302 7303 box.dialog( 7304 this.extendOptions(this.getPopupOptions(box), additionalOptions) 7305 ); 7306 7307 this.currentPopup = { 7308 'box': box, 7309 'widget': jQuery(box).dialog('widget') 7310 }; 7311 7312 7313 this.postprocess(); 7314 this.reposition(); 7315}; 7316 7317popup.getPopupOptions = function(box) 7318{ 7319 return { 7320 autoOpen: true, 7321 closeOnEscape: !box.data('dialog-no-close'), 7322 dialogClass: (box.data('dialog-class') ? box.data('dialog-class') : 'default-dialog') 7323 + ' ' + (box.attr('title') ? 'has-title' : 'no-title') + (box.data('dialog-no-close') ? ' no-close' : ''), 7324 draggable: false, 7325 height: 'auto', 7326 modal: (typeof(box.data('dialog-modal')) !== 'undefined' ? box.data('dialog-modal') : true), 7327 position: { my: "center", at: "center", of: window }, 7328 resizable: false, 7329 width: 'auto', 7330 minWidth: 300, 7331 minHeight: 150, 7332 7333 open: _.bind( 7334 function(event, ui) { 7335 jQuery('.overlay-blur-base').addClass('overlay-blur'); 7336 xcart.trigger('popup.open', { widget: this, event }); 7337 }, 7338 this 7339 ), 7340 close: _.bind( 7341 function(event, ui) { 7342 jQuery('.overlay-blur-base').removeClass('overlay-blur'); 7343 this.currentPopup.widget.find('form').each( 7344 function (index, elem) { 7345 jQuery(elem).validationEngine('hide'); 7346 } 7347 ); 7348 7349 this.close(event); 7350 }, 7351 this 7352 ), 7353 7354 beforeClose: _.bind(this.beforeClose, this) 7355 }; 7356}; 7357 7358popup.extendOptions = function(first, second) 7359{ 7360 _.each( 7361 ['dialogClass'], 7362 function (key) { 7363 if (_.isString(first[key]) && _.isString(second[key])) { 7364 first[key] += ' ' + second[key]; 7365 delete second[key]; 7366 } 7367 } 7368 ); 7369 7370 return _.extend(first, second); 7371}; 7372 7373// Reposition (center) popup 7374popup.reposition = function() 7375{ 7376 if (!this.currentPopup) { 7377 return; 7378 } 7379 7380 const box = this.currentPopup.box 7381 7382 if (box.length) { 7383 const self = this; 7384 setTimeout( 7385 function() { 7386 const widgetHeight = self.currentPopup.widget.outerHeight(true); 7387 const windowHeight = $(window).height(); 7388 7389 window.stickyElementsForPopup = { 7390 top: null, 7391 sizes: { 7392 top: 0, 7393 left: 0 7394 } 7395 }; 7396 7397 /** window.stickyElementsForPopup is expected to change in the event listeners. **/ 7398 window.dispatchEvent(new CustomEvent('updateStickyElementsForPopup')); 7399
7400 const atHorizontal = ("center+".concat(Math.round(window.stickyElementsForPopup.sizes.left / 2).toString())); 7401 7402 if (widgetHeight < windowHeight - window.stickyElementsForPopup.sizes.top) { 7403 const verticalShift = (" center+".concat(Math.round(window.stickyElementsForPopup.sizes.top / 2).toString())); 7404 try { 7405 box.dialog( 7406 "option", 7407 "position", 7408 { 7409 my: "center", 7410 at: atHorizontal.concat(verticalShift), 7411 of: window 7412 } 7413 ) 7414 } catch (e) {} 7415 } else if (window.stickyElementsForPopup.top) { 7416 try { 7417 box.dialog( 7418 "option", 7419 "position", 7420 { 7421 my: "top", 7422 at: atHorizontal.concat(" bottom"), 7423 of: window.stickyElementsForPopup.top 7424 } 7425 ) 7426 } catch (e) {} 7427 } else { 7428 try { 7429 box.dialog( 7430 "option", 7431 "position", 7432 { 7433 my: "top", 7434 at: "top", 7435 of: window, 7436 collision: "fit" 7437 } 7438 ) 7439 } catch (e) {} 7440 } 7441 }, 1 7442 ) 7443 } 7444}; 7445 7446// Destroy 7447popup.destroy = function() 7448{ 7449 if (this.currentPopup && this.currentPopup.box) { 7450 const box = this.currentPopup.box 7451 this.close() 7452 box.dialog('destroy') 7453 box.remove(); 7454 } 7455} 7456 7457 7458// Close popup 7459popup.close = function(event) 7460{ 7461 var box; 7462 if (this.currentPopup && this.currentPopup.box) { 7463 box = this.currentPopup.box; 7464 box.dialog('close'); 7465 7466 if (this.currentUnblockCallback && _.isFunction(this.currentUnblockCallback)) { 7467 this.currentUnblockCallback(); 7468 } 7469 } 7470 7471 this.currentUnblockCallback = null; 7472 this.currentPopup = null; 7473 7474 xcart.trigger('popup.close', { 'widget': this, 'box': box, event }); 7475}; 7476 7477popup.beforeClose = function(event) 7478{ 7479 var box; 7480 if (this.currentPopup && this.currentPopup.box) { 7481 box = this.currentPopup.box; 7482 } 7483 7484 xcart.trigger('popup.beforeClose', { 'widget': this, 'box': box, event }); 7485}; 7486 7487xcart.bind('popup.open', function () { 7488 document.querySelectorAll('.ui-dialog-titlebar-close').forEach(btn => { 7489 if (!btn.innerText) { 7490 btn.innerHTML += '<span class="visually-hidden">' + xcart.t('Close') + '</span>'; 7491 } 7492 }); 7493}); 7494 7495jQuery(window).resize( 7496 function(event) { 7497 popup.reposition(); 7498 } 7499);; 7500/* AUTOGENERATED: xcart.popup_button.js */ 7501/* vim: set ts=2 sw=2 sts=2 et: */ 7502 7503/** 7504 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 7505 * See https://www.x-cart.com/license-agreement.html for license details. 7506 */ 7507 7508var lastPopupButton; 7509 7510function PopupButton(base) { 7511 var obj = this; 7512 7513 if (base) { 7514 this.base = base; 7515 this.eachCallback(base); 7516 } else { 7517 this.base = jQuery(this.pattern); 7518 this.base.each( 7519 function () { 7520 obj.eachCallback(this); 7521 } 7522 ); 7523 } 7524} 7525 7526PopupButton.prototype.pattern = '.popup-button.default-popup-button'; 7527 7528PopupButton.prototype.enableBackgroundSubmit = true; 7529 7530PopupButton.prototype.options = { 7531 width: 'auto' 7532}; 7533 7534PopupButton.prototype.afterSubmit = function (selector) { 7535}; 7536 7537PopupButton.prototype.callback = function (selector, link) { 7538 7539 var obj = this; 7540 7541 var shouldClose = jQuery(this.base).data('without-close') === true || !jQuery(this.base).data('without-close'); 7542 7543 if (!this.enableBackgroundSubmit) { 7544 jQuery('form', selector).each(function () { 7545 this.commonController.backgroundSubmit = false; 7546 }); 7547 } else if (shouldClose) { 7548 jQuery('form', selector).each(function () { 7549 jQuery(this).commonController( 7550 'enableBackgroundSubmit', 7551 function () { 7552 // Close dialog (but it is available in DOM) 7553 popup.close(); 7554 openWaitBar(); 7555 7556 return true; 7557 }, 7558 function (event) { 7559 closeWaitBar(); 7560 7561 obj.afterSubmit(selector); 7562 7563 // Remove dialog from DOM 7564 jQuery(selector).remove(); 7565 link.linkedDialog = null; 7566 7567 return false; 7568 } 7569 ); 7570 }); 7571 } 7572 7573 $(link).trigger('popup.open'); 7574 7575 xcart.autoload(PopupButton); 7576}; 7577 7578PopupButton.prototype.getURLParams = function (button) { 7579 return xcart.getCommentedData(button, 'url_params'); 7580}; 7581 7582PopupButton.prototype.getJSConfirmText = function (button) { 7583 return xcart.getCommentedData(button, 'jsConfirm'); 7584}; 7585 7586PopupButton.prototype.eachClick = function (elem) { 7587 lastPopupButton = jQuery(elem); 7588 7589 var proceed = true; 7590 7591 if (lastPopupButton.hasClass('disabled')) { 7592 return false;
7593 } 7594 7595 if (this.getJSConfirmText(elem)) { 7596 proceed = confirm(this.getJSConfirmText(elem)); 7597 } 7598 7599 if (proceed) { 7600 this.beforeLoadDialog(elem); 7601 return loadDialogByLink( 7602 elem, 7603 URLHandler.buildURL(this.getURLParams(elem)), 7604 this.options, 7605 _.bind(this.callback, this), 7606 elem 7607 ); 7608 } 7609 7610 return proceed; 7611}; 7612 7613PopupButton.prototype.beforeLoadDialog = function (elem) { 7614}; 7615 7616PopupButton.prototype.eachCallback = function (elem) { 7617 var obj = this; 7618 elem.popupController = obj; 7619 7620 var handler = _.bind(obj.eachClick, this); 7621 jQuery(elem).click( 7622 function (event) { 7623 handler(this); 7624 event.stopImmediatePropagation(); 7625 7626 return false; 7627 } 7628 ); 7629};; 7630/* AUTOGENERATED: Sortable.js */ 7631/*! Sortable 1.13.0 - MIT | git://github.com/SortableJS/Sortable.git */ 7632!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Sortable=e()}(this,function(){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(){return(a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}).apply(this,arguments)}function I(i){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},e=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),e.forEach(function(t){var e,n,o;e=i,o=r[n=t],n in e?Object.defineProperty(e,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[n]=o})}return i}function l(t,e){if(null==t)return{};var n,o,i=function(t,e){if(null==t)return{};var n,o,i={},r=Object.keys(t);for(o=0;o<r.length;o++)n=r[o],0<=e.indexOf(n)||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(o=0;o<r.length;o++)n=r[o],0<=e.indexOf(n)||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function e(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function t(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var w=t(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),E=t(/Edge/i),c=t(/firefox/i),u=t(/safari/i)&&!t(/chrome/i)&&!t(/android/i),n=t(/iP(ad|od|hone)/i),i=t(/chrome/i)&&t(/android/i),r={capture:!1,passive:!1};function d(t,e,n){t.addEventListener(e,n,!w&&r)}function s(t,e,n){t.removeEventListener(e,n,!w&&r)}function h(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function P(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&h(t,e):h(t,e))||o&&t===n)return t;if(t===n)break}while(t=(i=t).host&&i!==document&&i.host.nodeType?i.host:i.parentNode)}var i;return null}var f,p=/\s+/g;function k(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(p," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(p," ")}}function R(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function v(t,e){var n="";if("string"==typeof t)n=t;else do{var o=R(t,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function g(t,e,n){if(t){var o=t.getElementsByTagName(e),i=0,r=o.length;if(n)for(;i<r;i++)n(o[i],i);return o}return[]}function A(){var t=document.scrollingElement;return t||document.documentElement}function X(t,e,n,o,i){if(t.getBoundingClientRect||t===window){var r,a,l,s,c,u,d;if(d=t!==window&&t.parentNode&&t!==A()?(a=(r=t.getBoundingClientRect()).top,l=r.left,s=r.bottom,c=r.right,u=r.height,r.width):(l=a=0,s=window.innerHeight,c=window.innerWidth,u=window.innerHeight,window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!w))do{if(i&&i.getBoundingClientRect&&("none"!==R(i,"transform")||n&&"static"!==R(i,"position"))){var h=i.getBoundingClientRect();a-=h.top+parseInt(R(i,"border-top-width")),l-=h.left+parseInt(R(i,"border-left-width")),s=a+r.height,c=l+r.width;break}}while(i=i.parentNode);
vendor: 4,111 bytes, line 7632
7632if(o&&t!==window){var f=v(i||t),p=f&&f.a,g=f&&f.d;f&&(s=(a/=g)+(u/=g),c=(l/=p)+(d/=p))}return{top:a,left:l,bottom:s,right:c,width:d,height:u}}}function Y(t,e,n){for(var o=H(t,!0),i=X(t)[e];o;){var r=X(o)[n];if(!("top"===n||"left"===n?r<=i:i<=r))return o;if(o===A())break;o=H(o,!1)}return!1}function m(t,e,n){for(var o=0,i=0,r=t.children;i<r.length;){if("none"!==r[i].style.display&&r[i]!==Rt.ghost&&r[i]!==Rt.dragged&&P(r[i],n.draggable,t,!1)){if(o===e)return r[i];o++}i++}return null}function B(t,e){for(var n=t.lastElementChild;n&&(n===Rt.ghost||"none"===R(n,"display")||e&&!h(n,e));)n=n.previousElementSibling;return n||null}function F(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Rt.clone||e&&!h(t,e)||n++;return n}function b(t){var e=0,n=0,o=A();if(t)do{var i=v(t),r=i.a,a=i.d;e+=t.scrollLeft*r,n+=t.scrollTop*a}while(t!==o&&(t=t.parentNode));return[e,n]}function H(t,e){if(!t||!t.getBoundingClientRect)return A();var n=t,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=R(n);if(n.clientWidth<n.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!n.getBoundingClientRect||n===document.body)return A();if(o||e)return n;o=!0}}}while(n=n.parentNode);return A()}function y(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function D(e,n){return function(){if(!f){var t=arguments;1===t.length?e.call(this,t[0]):e.apply(this,t),f=setTimeout(function(){f=void 0},n)}}}function L(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function S(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}function _(t,e){R(t,"position","absolute"),R(t,"top",e.top),R(t,"left",e.left),R(t,"width",e.width),R(t,"height",e.height)}function C(t){R(t,"position",""),R(t,"top",""),R(t,"left",""),R(t,"width",""),R(t,"height","")}var j="Sortable"+(new Date).getTime();function T(){var e,o=[];return{captureAnimationState:function(){o=[],this.options.animation&&[].slice.call(this.el.children).forEach(function(t){if("none"!==R(t,"display")&&t!==Rt.ghost){o.push({target:t,rect:X(t)});var e=I({},o[o.length-1].rect);if(t.thisAnimationDuration){var n=v(t,!0);n&&(e.top-=n.f,e.left-=n.e)}t.fromRect=e}})},addAnimationState:function(t){o.push(t)},removeAnimationState:function(t){o.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var o in e)if(e.hasOwnProperty(o)&&e[o]===t[n][o])return Number(n);return-1}(o,{target:t}),1)},animateAll:function(t){var c=this;if(!this.options.animation)return clearTimeout(e),void("function"==typeof t&&t());var u=!1,d=0;o.forEach(function(t){var e=0,n=t.target,o=n.fromRect,i=X(n),r=n.prevFromRect,a=n.prevToRect,l=t.rect,s=v(n,!0);s&&(i.top-=s.f,i.left-=s.e),n.toRect=i,n.thisAnimationDuration&&y(r,i)&&!y(o,i)&&(l.top-i.top)/(l.left-i.left)==(o.top-i.top)/(o.left-i.left)&&(e=function(t,e,n,o){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*o.animation}(l,r,a,c.options)),y(i,o)||(n.prevFromRect=o,n.prevToRect=i,e||(e=c.options.animation),c.animate(n,l,i,e)),e&&(u=!0,d=Math.max(d,e),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout(function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null},e),n.thisAnimationDuration=e)}),clearTimeout(e),u?e=setTimeout(function(){"function"==typeof t&&t()},d):"function"==typeof t&&t(),o=[]},animate:function(t,e,n,o){if(o){R(t,"transition",""),R(t,"transform","");var i=v(this.el),r=i&&i.a,a=i&&i.d,l=(e.left-n.left)/(r||1),s=(e.top-n.top)/(a||1);t.animatingX=!!l,t.animatingY=!!s,R(t,"transform","translate3d("+l+"px,"+s+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),R(t,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),R(t,"transform","translate3d(0,
76320,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout(function(){R(t,"transition",""),R(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1},o)}}}}var x=[],M={initializeByDefault:!0},O={mount:function(e){for(var t in M)!M.hasOwnProperty(t)||t in e||(e[t]=M[t]);x.forEach(function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),x.push(e)},pluginEvent:function(e,n,o){var t=this;this.eventCanceled=!1,o.cancel=function(){t.eventCanceled=!0};var i=e+"Global";x.forEach(function(t){n[t.pluginName]&&(n[t.pluginName][i]&&n[t.pluginName][i](I({sortable:n},o)),n.options[t.pluginName]&&n[t.pluginName][e]&&n[t.pluginName][e](I({sortable:n},o)))})},initializePlugins:function(o,i,r,t){for(var e in x.forEach(function(t){var e=t.pluginName;if(o.options[e]||t.initializeByDefault){var n=new t(o,i,o.options);n.sortable=o,n.options=o.options,o[e]=n,a(r,n.defaults)}}),o.options)if(o.options.hasOwnProperty(e)){var n=this.modifyOption(o,e,o.options[e]);void 0!==n&&(o.options[e]=n)}},getEventProperties:function(e,n){var o={};return x.forEach(function(t){"function"==typeof t.eventProperties&&a(o,t.eventProperties.call(n[t.pluginName],e))}),o},modifyOption:function(e,n,o){var i;return x.forEach(function(t){e[t.pluginName]&&t.optionListeners&&"function"==typeof t.optionListeners[n]&&(i=t.optionListeners[n].call(e[t.pluginName],o))}),i}};function N(t){var e=t.sortable,n=t.rootEl,o=t.name,i=t.targetEl,r=t.cloneEl,a=t.toEl,l=t.fromEl,s=t.oldIndex,c=t.newIndex,u=t.oldDraggableIndex,d=t.newDraggableIndex,h=t.originalEvent,f=t.putSortable,p=t.extraEventProperties;if(e=e||n&&n[j]){var g,v=e.options,m="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||w||E?(g=document.createEvent("Event")).initEvent(o,!0,!0):g=new CustomEvent(o,{bubbles:!0,cancelable:!0}),g.to=a||n,g.from=l||n,g.item=i||n,g.clone=r,g.oldIndex=s,g.newIndex=c,g.oldDraggableIndex=u,g.newDraggableIndex=d,g.originalEvent=h,g.pullMode=f?f.lastPutMode:void 0;var b=I({},p,O.getEventProperties(o,e));for(var y in b)g[y]=b[y];n&&n.dispatchEvent(g),v[m]&&v[m].call(e,g)}}function K(t,e,n){var o=2<arguments.length&&void 0!==n?n:{},i=o.evt,r=l(o,["evt"]);O.pluginEvent.bind(Rt)(t,e,I({dragEl:z,parentEl:G,ghostEl:U,rootEl:q,nextEl:V,lastDownEl:Z,cloneEl:Q,cloneHidden:$,dragStarted:dt,putSortable:it,activeSortable:Rt.active,originalEvent:i,oldIndex:J,oldDraggableIndex:et,newIndex:tt,newDraggableIndex:nt,hideGhostForTarget:At,unhideGhostForTarget:It,cloneNowHidden:function(){$=!0},cloneNowShown:function(){$=!1},dispatchSortableEvent:function(t){W({sortable:e,name:t,originalEvent:i})}},r))}function W(t){N(I({putSortable:it,cloneEl:Q,targetEl:z,rootEl:q,oldIndex:J,oldDraggableIndex:et,newIndex:tt,newDraggableIndex:nt},t))}var z,G,U,q,V,Z,Q,$,J,tt,et,nt,ot,it,rt,at,lt,st,ct,ut,dt,ht,ft,pt,gt,vt=!1,mt=!1,bt=[],yt=!1,wt=!1,Et=[],Dt=!1,St=[],_t="undefined"!=typeof document,Ct=n,Tt=E||w?"cssFloat":"float",xt=_t&&!i&&!n&&"draggable"in document.createElement("div"),Mt=function(){if(_t){if(w)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}
vendor: 5,130 bytes, line 7632
7632(),Ot=function(t,e){var n=R(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=m(t,0,e),r=m(t,1,e),a=i&&R(i),l=r&&R(r),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+X(i).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+X(r).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&a.float&&"none"!==a.float){var u="left"===a.float?"left":"right";return!r||"both"!==l.clear&&l.clear!==u?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||o<=s&&"none"===n[Tt]||r&&"none"===n[Tt]&&o<s+c)?"vertical":"horizontal"},Nt=function(t){function s(a,l){return function(t,e,n,o){var i=t.options.group.name&&e.options.group.name&&t.options.group.name===e.options.group.name;if(null==a&&(l||i))return!0;if(null==a||!1===a)return!1;if(l&&"clone"===a)return a;if("function"==typeof a)return s(a(t,e,n,o),l)(t,e,n,o);var r=(l?t:e).options.group.name;return!0===a||"string"==typeof a&&a===r||a.join&&-1<a.indexOf(r)}}var e={},n=t.group;n&&"object"==o(n)||(n={name:n}),e.name=n.name,e.checkPull=s(n.pull,!0),e.checkPut=s(n.put),e.revertClone=n.revertClone,t.group=e},At=function(){!Mt&&U&&R(U,"display","none")},It=function(){!Mt&&U&&R(U,"display","")};_t&&document.addEventListener("click",function(t){if(mt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),mt=!1},!0);function Pt(t){if(z){var e=function(r,a){var l;return bt.some(function(t){if(!B(t)){var e=X(t),n=t[j].options.emptyInsertThreshold,o=r>=e.left-n&&r<=e.right+n,i=a>=e.top-n&&a<=e.bottom+n;return n&&o&&i?l=t:void 0}}),l}((t=t.touches?t.touches[0]:t).clientX,t.clientY);if(e){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[j]._onDragOver(n)}}}function kt(t){z&&z.parentNode[j]._isOutsideThisEl(t.target)}function Rt(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=a({},e),t[j]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ot(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Rt.supportPointer&&"PointerEvent"in window&&!u,emptyInsertThreshold:5};for(var o in O.initializePlugins(this,t,n),n)o in e||(e[o]=n[o]);for(var i in Nt(e),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&xt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?d(t,"pointerdown",this._onTapStart):(d(t,"mousedown",this._onTapStart),d(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(d(t,"dragover",this),d(t,"dragenter",this)),bt.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),a(this,T())}function Xt(t,e,n,o,i,r,a,l){var s,c,u=t[j],d=u.options.onMove;return!window.CustomEvent||w||E?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=e,s.from=t,s.dragged=n,s.draggedRect=o,s.related=i||e,s.relatedRect=r||X(e),s.willInsertAfter=l,s.originalEvent=a,t.dispatchEvent(s),d&&(c=d.call(u,s,a)),c}function Yt(t){t.draggable=!1}function Bt(){Dt=!1}function Ft(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function Ht(t){return setTimeout(t,0)}function Lt(t){return clearTimeout(t)}Rt.prototype={constructor:Rt,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(ht=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,z):this.options.direction},_onTapStart:function(e){if(e.cancelable){var n=this,o=this.el,t=this.options,i=t.preventOnFilter,r=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(a||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,c=t.filter;if(function(t){St.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&St.push(o)}}(o),!z&&!(/mousedown|pointerdown/.test(r)&&0!==e.button||t.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!u||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=P(l,t.draggable,o,
vendor: 6,263 bytes, line 7632
7632!1))&&l.animated||Z===l)){if(J=F(l),et=F(l,t.draggable),"function"==typeof c){if(c.call(this,e,l,this))return W({sortable:n,rootEl:s,name:"filter",targetEl:l,toEl:o,fromEl:o}),K("filter",n,{evt:e}),void(i&&e.cancelable&&e.preventDefault())}else if(c&&(c=c.split(",").some(function(t){if(t=P(s,t.trim(),o,!1))return W({sortable:n,rootEl:t,name:"filter",targetEl:l,fromEl:o,toEl:o}),K("filter",n,{evt:e}),!0})))return void(i&&e.cancelable&&e.preventDefault());t.handle&&!P(s,t.handle,o,!1)||this._prepareDragStart(e,a,l)}}},_prepareDragStart:function(t,e,n){var o,i=this,r=i.el,a=i.options,l=r.ownerDocument;if(n&&!z&&n.parentNode===r){var s=X(n);if(q=r,G=(z=n).parentNode,V=z.nextSibling,Z=n,ot=a.group,rt={target:Rt.dragged=z,clientX:(e||t).clientX,clientY:(e||t).clientY},ct=rt.clientX-s.left,ut=rt.clientY-s.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,z.style["will-change"]="all",o=function(){K("delayEnded",i,{evt:t}),Rt.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!c&&i.nativeDraggable&&(z.draggable=!0),i._triggerDragStart(t,e),W({sortable:i,name:"choose",originalEvent:t}),k(z,a.chosenClass,!0))},a.ignore.split(",").forEach(function(t){g(z,t.trim(),Yt)}),d(l,"dragover",Pt),d(l,"mousemove",Pt),d(l,"touchmove",Pt),d(l,"mouseup",i._onDrop),d(l,"touchend",i._onDrop),d(l,"touchcancel",i._onDrop),c&&this.nativeDraggable&&(this.options.touchStartThreshold=4,z.draggable=!0),K("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(E||w))o();else{if(Rt.eventCanceled)return void this._onDrop();d(l,"mouseup",i._disableDelayedDrag),d(l,"touchend",i._disableDelayedDrag),d(l,"touchcancel",i._disableDelayedDrag),d(l,"mousemove",i._delayedDragTouchMoveHandler),d(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&d(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(o,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){z&&Yt(z),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;s(t,"mouseup",this._disableDelayedDrag),s(t,"touchend",this._disableDelayedDrag),s(t,"touchcancel",this._disableDelayedDrag),s(t,"mousemove",this._delayedDragTouchMoveHandler),s(t,"touchmove",this._delayedDragTouchMoveHandler),s(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?d(document,"pointermove",this._onTouchMove):d(document,e?"touchmove":"mousemove",this._onTouchMove):(d(z,"dragend",this),d(q,"dragstart",this._onDragStart));try{document.selection?Ht(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(vt=!1,q&&z){K("dragStarted",this,{evt:e}),this.nativeDraggable&&d(document,"dragover",kt);var n=this.options;t||k(z,n.dragClass,!1),k(z,n.ghostClass,!0),Rt.active=this,t&&this._appendGhost(),W({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(at){this._lastX=at.clientX,this._lastY=at.clientY,At();for(var t=document.elementFromPoint(at.clientX,at.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(at.clientX,at.clientY))!==e;)e=t;if(z.parentNode[j]._isOutsideThisEl(t),e)do{if(e[j]){if(e[j]._onDragOver({clientX:at.clientX,clientY:at.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);It()}},_onTouchMove:function(t){if(rt){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,i=t.touches?t.touches[0]:t,r=U&&v(U,!0),a=U&&r&&r.a,l=U&&r&&r.d,s=Ct&>&&b(gt),c=(i.clientX-rt.clientX+o.x)/(a||1)+(s?s[0]-Et[0]:0)/(a||1),u=(i.clientY-rt.clientY+o.y)/(l||1)+(s?s[1]-Et[1]:0)/(l||1);if(!Rt.active&&!vt){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(U){r?(r.e+=c-(lt||0),r.f+=u-(st||0)):r={a:1,b:0,c:0,d:1,e:c,f:u};var d="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");R(U,"webkitTransform",d),R(U,"mozTransform",d),R(U,"msTransform",d),R(U,"transform",d),lt=c,st=u,at=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!U){var t=this.options.fallbackOnBody?document.body:q,e=X(z,!0,Ct,!0,t),n=this.options;if(Ct){for(gt=t;"static"===R(gt,"position")&&"none"===R(gt,"transform")&>!==document;)gt=gt.parentNode;gt!==document.body&>!==document.documentElement?(gt===document&&(gt=A()),e.top+=gt.scrollTop,e.left+=gt.scrollLeft):gt=A(),Et=b(gt)}k(U=z.cloneNode(!0),n.ghostClass,!1),k(U,n.fallbackClass,!0),k(U,n.dragClass,!0),R(U,"transition",""),R(U,"transform",""),R(U,"box-sizing","border-box"),R(U,"margin",0),R(U,"top",e.top),R(U,"left",e.left),R(U,"width",e.width),R(U,"height",e.height),R(U,"opacity","0.8"),R(U,"position",Ct?"absolute":"fixed"),R(U,"zIndex","100000"),R(U,"pointerEvents","none"),Rt.ghost=U,t.appendChild(U),R(U,"transform-origin",ct/parseInt(U.style.width)*100+"% "+ut/parseInt(U.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,o=t.dataTransfer,i=n.options;K("dragStart",this,{evt:t}),Rt.eventCanceled?this._onDrop():(K("setupClone",this),Rt.eventCanceled||((Q=S(z)).draggable=!1,Q.style["will-change"]="",this._hideClone(),k(Q,this.options.chosenClass,!1),Rt.clone=Q),n.cloneId=Ht(function(){K("clone",n),Rt.eventCanceled||(n.options.removeCloneOnHide||q.insertBefore(Q,z),n._hideClone(),W({sortable:n,name:"clone"}))}),e||k(z,i.dragClass,!0),e?(mt=!0,n._loopId=setInterval(n._emulateDragOver,50)):(s(document,"mouseup",n._onDrop),s(document,"touchend",n._onDrop),s(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(n,o,z)),d(document,"drop",n),R(z,"transform","translateZ(0)")),vt=!0,n._dragStartId=Ht(n._dragStarted.bind(n,e,t)),d(document,"selectstart",n),dt=!0,u&&R(document.body,"user-select","none"))},_onDragOver:function(n){var o,i,r,a,l=this.el,s=n.target,e=this.options,t=e.group,c=Rt.active,u=ot===t,d=e.s
vendor: 4,823 bytes, line 7632
7632ort,h=it||c,f=this,p=!1;if(!Dt){if(void 0!==n.preventDefault&&n.cancelable&&n.preventDefault(),s=P(s,e.draggable,l,!0),M("dragOver"),Rt.eventCanceled)return p;if(z.contains(n.target)||s.animated&&s.animatingX&&s.animatingY||f._ignoreWhileAnimating===s)return N(!1);if(mt=!1,c&&!e.disabled&&(u?d||(r=!q.contains(z)):it===this||(this.lastPutMode=ot.checkPull(this,c,z,n))&&t.checkPut(this,c,z,n))){if(a="vertical"===this._getDirection(n,s),o=X(z),M("dragOverValid"),Rt.eventCanceled)return p;if(r)return G=q,O(),this._hideClone(),M("revert"),Rt.eventCanceled||(V?q.insertBefore(z,V):q.appendChild(z)),N(!0);var g=B(l,e.draggable);if(!g||function(t,e,n){var o=X(B(n.el,n.options.draggable));return e?t.clientX>o.right+10||t.clientX<=o.right&&t.clientY>o.bottom&&t.clientX>=o.left:t.clientX>o.right&&t.clientY>o.top||t.clientX<=o.right&&t.clientY>o.bottom+10}(n,a,this)&&!g.animated){if(g===z)return N(!1);if(g&&l===n.target&&(s=g),s&&(i=X(s)),!1!==Xt(q,l,z,o,s,i,n,!!s))return O(),l.appendChild(z),G=l,A(),N(!0)}else if(s.parentNode===l){i=X(s);var v,m,b,y=z.parentNode!==l,w=!function(t,e,n){var o=n?t.left:t.top,i=n?t.right:t.bottom,r=n?t.width:t.height,a=n?e.left:e.top,l=n?e.right:e.bottom,s=n?e.width:e.height;return o===a||i===l||o+r/2===a+s/2}(z.animated&&z.toRect||o,s.animated&&s.toRect||i,a),E=a?"top":"left",D=Y(s,"top","top")||Y(z,"top","top"),S=D?D.scrollTop:void 0;if(ht!==s&&(m=i[E],yt=!1,wt=!w&&e.invertSwap||y),0!==(v=function(t,e,n,o,i,r,a,l){var s=o?t.clientY:t.clientX,c=o?n.height:n.width,u=o?n.top:n.left,d=o?n.bottom:n.right,h=!1;if(!a)if(l&&pt<c*i){if(!yt&&(1===ft?u+c*r/2<s:s<d-c*r/2)&&(yt=!0),yt)h=!0;else if(1===ft?s<u+pt:d-pt<s)return-ft}else if(u+c*(1-i)/2<s&&s<d-c*(1-i)/2)return function(t){return F(z)<F(t)?1:-1}(e);if((h=h||a)&&(s<u+c*r/2||d-c*r/2<s))return u+c/2<s?1:-1;return 0}(n,s,i,a,w?1:e.swapThreshold,null==e.invertedSwapThreshold?e.swapThreshold:e.invertedSwapThreshold,wt,ht===s)))for(var _=F(z);_-=v,(b=G.children[_])&&("none"===R(b,"display")||b===U););if(0===v||b===s)return N(!1);ft=v;var C=(ht=s).nextElementSibling,T=!1,x=Xt(q,l,z,o,s,i,n,T=1===v);if(!1!==x)return 1!==x&&-1!==x||(T=1===x),Dt=!0,setTimeout(Bt,30),O(),T&&!C?l.appendChild(z):s.parentNode.insertBefore(z,T?C:s),D&&L(D,0,S-D.scrollTop),G=z.parentNode,void 0===m||wt||(pt=Math.abs(m-X(s)[E])),A(),N(!0)}if(l.contains(z))return N(!1)}return!1}function M(t,e){K(t,f,I({evt:n,isOwner:u,axis:a?"vertical":"horizontal",revert:r,dragRect:o,targetRect:i,canSort:d,fromSortable:h,target:s,completed:N,onMove:function(t,e){return Xt(q,l,z,o,t,X(t),n,e)},changed:A},e))}function O(){M("dragOverAnimationCapture"),f.captureAnimationState(),f!==h&&h.captureAnimationState()}function N(t){return M("dragOverCompleted",{insertion:t}),t&&(u?c._hideClone():c._showClone(f),f!==h&&(k(z,it?it.options.ghostClass:c.options.ghostClass,!1),k(z,e.ghostClass,!0)),it!==f&&f!==Rt.active?it=f:f===Rt.active&&it&&(it=null),h===f&&(f._ignoreWhileAnimating=s),f.animateAll(function(){M("dragOverAnimationComplete"),f._ignoreWhileAnimating=null}),f!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(s===z&&!z.animated||s===l&&!s.animated)&&(ht=null),e.dragoverBubble||n.rootEl||s===document||(z.parentNode[j]._isOutsideThisEl(n.target),t||Pt(n)),!e.dragoverBubble&&n.stopPropagation&&n.stopPropagation(),p=!0}function A(){tt=F(z),nt=F(z,e.draggable),W({sortable:f,name:"change",toEl:l,newIndex:tt,newDraggableIndex:nt,originalEvent:n})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){s(document,"mousemove",this._onTouchMove),s(document,"touchmove",this._onTouchMove),s(document,"pointermove",this._onTouchMove),s(document,"dragover",Pt),s(document,"mousemove",Pt),s(document,"touchmove",Pt)},_offUpEvents:function(){var t=this.el.ownerDocument;s(t,"mouseup",this._onDrop),s(t,"touchend",this._onDrop),s(t,"pointerup",this._onDrop),s(t,"touchcancel",this._onDrop),s(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;tt=F(z),nt=F(z,n.draggable),K("drop",this,{evt:t}),G=z&&z.parentNode,tt=F(z),nt=F(z,n.draggable),Rt.eventCanceled||(yt=wt=vt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Lt(this.cloneId),Lt(this._dragStartId),this.nativeDraggable&&(s(document,"drop",this),s(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),u&&R(document.body,"user-select",""),R(z,"transform",""),t&&(dt&&(t.cancelable&&t.preventDefault(),n.dropBubble||t.stopPropagation()),U&&U.parentNode&&U.parentNode.removeChild(U),(q===G||it&&"clone"!==it.lastPutMode)&&Q&&Q.parentNode&&Q.parentNode.removeChild(Q),z&&(this.nativeDraggable&&s(z,"dragend",this),Yt(z),z.style["will-change"]="",dt&&!vt&&k(z,it?it.options.ghostClass:this.options.ghostClass,!1),k(z,this.options.chosenClass,!1),W({sortable:this,name:"unchoose",toEl:G,newIndex:null,newDraggableIndex:null,originalEvent:t}
vendor: 4,187 bytes, line 7632
7632),q!==G?(0<=tt&&(W({rootEl:G,name:"add",toEl:G,fromEl:q,originalEvent:t}),W({sortable:this,name:"remove",toEl:G,originalEvent:t}),W({rootEl:G,name:"sort",toEl:G,fromEl:q,originalEvent:t}),W({sortable:this,name:"sort",toEl:G,originalEvent:t})),it&&it.save()):tt!==J&&0<=tt&&(W({sortable:this,name:"update",toEl:G,originalEvent:t}),W({sortable:this,name:"sort",toEl:G,originalEvent:t})),Rt.active&&(null!=tt&&-1!==tt||(tt=J,nt=et),W({sortable:this,name:"end",toEl:G,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){K("nulling",this),q=z=G=U=V=Q=Z=$=rt=at=dt=tt=nt=J=et=ht=ft=it=ot=Rt.dragged=Rt.ghost=Rt.clone=Rt.active=null,St.forEach(function(t){t.checked=!0}),St.length=lt=st=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":z&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,i=n.length,r=this.options;o<i;o++)P(t=n[o],r.draggable,this.el,!1)&&e.push(t.getAttribute(r.dataIdAttr)||Ft(t));return e},sort:function(t,e){var o={},i=this.el;this.toArray().forEach(function(t,e){var n=i.children[e];P(n,this.options.draggable,i,!1)&&(o[t]=n)},this),e&&this.captureAnimationState(),t.forEach(function(t){o[t]&&(i.removeChild(o[t]),i.appendChild(o[t]))}),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return P(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var o=O.modifyOption(this,t,e);n[t]=void 0!==o?o:e,"group"===t&&Nt(n)},destroy:function(){K("destroy",this);var t=this.el;t[j]=null,s(t,"mousedown",this._onTapStart),s(t,"touchstart",this._onTapStart),s(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(s(t,"dragover",this),s(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),bt.splice(bt.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!$){if(K("hideClone",this),Rt.eventCanceled)return;R(Q,"display","none"),this.options.removeCloneOnHide&&Q.parentNode&&Q.parentNode.removeChild(Q),$=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if($){if(K("showClone",this),Rt.eventCanceled)return;z.parentNode!=q||this.options.group.revertClone?V?q.insertBefore(Q,V):q.appendChild(Q):q.insertBefore(Q,z),this.options.group.revertClone&&this.animate(z,Q),R(Q,"display",""),$=!1}}else this._hideClone()}},_t&&d(document,"touchmove",function(t){(Rt.active||vt)&&t.cancelable&&t.preventDefault()}),Rt.utils={on:d,off:s,css:R,find:g,is:function(t,e){return!!P(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},throttle:D,closest:P,toggleClass:k,clone:S,index:F,nextTick:Ht,cancelNextTick:Lt,detectDirection:Ot,getChild:m},Rt.get=function(t){return t[j]},Rt.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach(function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Rt.utils=I({},Rt.utils,t.utils)),O.mount(t)})},Rt.create=function(t,e){return new Rt(t,e)};var jt,Kt,Wt,zt,Gt,Ut,qt=[],Vt=!(Rt.version="1.13.0");function Zt(){qt.forEach(function(t){clearInterval(t.pid)}),qt=[]}function Qt(){clearInterval(Ut)}function $t(t){var e=t.originalEvent,n=t.putSortable,o=t.dragEl,i=t.activeSortable,r=t.dispatchSortableEvent,a=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(e){var s=n||i;a();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,u=document.elementFromPoint(c.clientX,c.clientY);l(),s&&!s.el.contains(u)&&(r("spill"),this.onSpill({dragEl:o,putSortable:n}))}}var Jt,te=D(function(n,t,e,o){if(t.scroll){var i,r=(n.touches?n.touches[0]:n).clientX,a=(n.touches?n.touches[0]:n).clientY,l=t.scrollSensitivity,s=t.scrollSpeed,c=A(),u=!1;Kt!==e&&(Kt=e,Zt(),jt=t.scroll,i=t.scrollFn,!0===jt&&(jt=H(e,!0))
vendor: 5,137 bytes, line 7632
7632);var d=0,h=jt;do{var f=h,p=X(f),g=p.top,v=p.bottom,m=p.left,b=p.right,y=p.width,w=p.height,E=void 0,D=void 0,S=f.scrollWidth,_=f.scrollHeight,C=R(f),T=f.scrollLeft,x=f.scrollTop;D=f===c?(E=y<S&&("auto"===C.overflowX||"scroll"===C.overflowX||"visible"===C.overflowX),w<_&&("auto"===C.overflowY||"scroll"===C.overflowY||"visible"===C.overflowY)):(E=y<S&&("auto"===C.overflowX||"scroll"===C.overflowX),w<_&&("auto"===C.overflowY||"scroll"===C.overflowY));var M=E&&(Math.abs(b-r)<=l&&T+y<S)-(Math.abs(m-r)<=l&&!!T),O=D&&(Math.abs(v-a)<=l&&x+w<_)-(Math.abs(g-a)<=l&&!!x);if(!qt[d])for(var N=0;N<=d;N++)qt[N]||(qt[N]={});qt[d].vx==M&&qt[d].vy==O&&qt[d].el===f||(qt[d].el=f,qt[d].vx=M,qt[d].vy=O,clearInterval(qt[d].pid),0==M&&0==O||(u=!0,qt[d].pid=setInterval(function(){o&&0===this.layer&&Rt.active._onTouchMove(Gt);var t=qt[this.layer].vy?qt[this.layer].vy*s:0,e=qt[this.layer].vx?qt[this.layer].vx*s:0;"function"==typeof i&&"continue"!==i.call(Rt.dragged.parentNode[j],e,t,n,Gt,qt[this.layer].el)||L(qt[this.layer].el,e,t)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&h!==c&&(h=H(h,!1)));Vt=u}},30);function ee(){}function ne(){}ee.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=m(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(e,o):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:$t},a(ee,{pluginName:"revertOnSpill"}),ne.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable||this.sortable;n.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),n.animateAll()},drop:$t},a(ne,{pluginName:"removeOnSpill"});var oe,ie,re,ae,le,se=[],ce=[],ue=!1,de=!1,he=!1;function fe(o,i){ce.forEach(function(t,e){var n=i.children[t.sortableIndex+(o?Number(e):0)];n?i.insertBefore(t,n):i.appendChild(t)})}function pe(){se.forEach(function(t){t!==re&&t.parentNode&&t.parentNode.removeChild(t)})}return Rt.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?d(document,"dragover",this._handleAutoScroll):this.options.supportPointer?d(document,"pointermove",this._handleFallbackAutoScroll):e.touches?d(document,"touchmove",this._handleFallbackAutoScroll):d(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?s(document,"dragover",this._handleAutoScroll):(s(document,"pointermove",this._handleFallbackAutoScroll),s(document,"touchmove",this._handleFallbackAutoScroll),s(document,"mousemove",this._handleFallbackAutoScroll)),Qt(),Zt(),clearTimeout(f),f=void 0},nulling:function(){Gt=Kt=jt=Vt=Ut=Wt=zt=null,qt.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(e,n){var o=this,i=(e.touches?e.touches[0]:e).clientX,r=(e.touches?e.touches[0]:e).clientY,t=document.elementFromPoint(i,r);if(Gt=e,n||E||w||u){te(e,this.options,t,n);var a=H(t,!0);!Vt||Ut&&i===Wt&&r===zt||(Ut&&Qt(),Ut=setInterval(function(){var t=H(document.elementFromPoint(i,r),!0);t!==a&&(a=t,Zt()),te(e,o.options,t,n)},10),Wt=i,zt=r)}else{if(!this.options.bubbleScroll||H(t,!0)===A())return void Zt();te(e,this.options,H(t,!1),!1)}}},a(t,{pluginName:"scroll",initializeByDefault:!0})}),Rt.mount(ne,ee),Rt.mount(new function(){function t(){this.defaults={swapClass:"sortable-swap-highlight"}}return t.prototype={dragStart:function(t){var e=t.dragEl;Jt=e},dragOverValid:function(t){var e=t.completed,n=t.target,o=t.onMove,i=t.activeSortable,r=t.changed,a=t.cancel;if(i.options.swap){var l=this.sortable.el,s=this.options;if(n&&n!==l){var c=Jt;Jt=!1!==o(n)?(k(n,s.swapClass,!0),n):null,c&&c!==Jt&&k(c,s.swapClass,!1)}r(),e(!0),a()}},drop:function(t){var e=t.activeSortable,n=t.putSortable,o=t.dragEl,i=n||this.sortable,r=this.options;Jt&&k(Jt,r.swapClass,!1),Jt&&(r.swap||n&&n.options.swap)&&o!==Jt&&(i.captureAnimationState(),i!==e&&e.captureAnimationState(),function(t,e){var n,o,i=t.parentNode,r=e.parentNode;if(!i||!r||i.isEqualNode(e)||r.isEqualNode(t))return;n=F(t),o=F(e),i.isEqualNode(r)&&n<o&&o++;i.insertBefore(e,i.children[n]),r.insertBefore(t,r.children[o])}(o,Jt),i.animateAll(),i!==e&&e.animateAll())},nulling:function(){Jt=null}},a(t,{pluginName:"swap",eventProperties:function(){return{swapItem:Jt}}})}),Rt.mount(new function(){function t(o){for(var t in this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this));o.options.supportPointer?d(document,"pointerup",this._deselectMultiDrag):(d(document,"mouseup",this._deselectMultiDrag),d(document,"touchend",this._deselectMultiDrag)),d(document,"keydown",this._checkKeyDown),d(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,
vendor: 4,611 bytes, line 7632
7632setData:function(t,e){var n="";se.length&&ie===o?se.forEach(function(t,e){n+=(e?", ":"")+t.textContent}):n=e.textContent,t.setData("Text",n)}}}return t.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(t){var e=t.dragEl;re=e},delayEnded:function(){this.isMultiDrag=~se.indexOf(re)},setupClone:function(t){var e=t.sortable,n=t.cancel;if(this.isMultiDrag){for(var o=0;o<se.length;o++)ce.push(S(se[o])),ce[o].sortableIndex=se[o].sortableIndex,ce[o].draggable=!1,ce[o].style["will-change"]="",k(ce[o],this.options.selectedClass,!1),se[o]===re&&k(ce[o],this.options.chosenClass,!1);e._hideClone(),n()}},clone:function(t){var e=t.sortable,n=t.rootEl,o=t.dispatchSortableEvent,i=t.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||se.length&&ie===e&&(fe(!0,n),o("clone"),i()))},showClone:function(t){var e=t.cloneNowShown,n=t.rootEl,o=t.cancel;this.isMultiDrag&&(fe(!1,n),ce.forEach(function(t){R(t,"display","")}),e(),le=!1,o())},hideClone:function(t){var e=this,n=(t.sortable,t.cloneNowHidden),o=t.cancel;this.isMultiDrag&&(ce.forEach(function(t){R(t,"display","none"),e.options.removeCloneOnHide&&t.parentNode&&t.parentNode.removeChild(t)}),n(),le=!0,o())},dragStartGlobal:function(t){t.sortable;!this.isMultiDrag&&ie&&ie.multiDrag._deselectMultiDrag(),se.forEach(function(t){t.sortableIndex=F(t)}),se=se.sort(function(t,e){return t.sortableIndex-e.sortableIndex}),he=!0},dragStarted:function(t){var e=this,n=t.sortable;if(this.isMultiDrag){if(this.options.sort&&(n.captureAnimationState(),this.options.animation)){se.forEach(function(t){t!==re&&R(t,"position","absolute")});var o=X(re,!1,!0,!0);se.forEach(function(t){t!==re&&_(t,o)}),ue=de=!0}n.animateAll(function(){ue=de=!1,e.options.animation&&se.forEach(function(t){C(t)}),e.options.sort&&pe()})}},dragOver:function(t){var e=t.target,n=t.completed,o=t.cancel;de&&~se.indexOf(e)&&(n(!1),o())},revert:function(t){var e=t.fromSortable,n=t.rootEl,o=t.sortable,i=t.dragRect;1<se.length&&(se.forEach(function(t){o.addAnimationState({target:t,rect:de?X(t):i}),C(t),t.fromRect=i,e.removeAnimationState(t)}),de=!1,function(o,i){se.forEach(function(t,e){var n=i.children[t.sortableIndex+(o?Number(e):0)];n?i.insertBefore(t,n):i.appendChild(t)})}(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(t){var e=t.sortable,n=t.isOwner,o=t.insertion,i=t.activeSortable,r=t.parentEl,a=t.putSortable,l=this.options;if(o){if(n&&i._hideClone(),ue=!1,l.animation&&1<se.length&&(de||!n&&!i.options.sort&&!a)){var s=X(re,!1,!0,!0);se.forEach(function(t){t!==re&&(_(t,s),r.appendChild(t))}),de=!0}if(!n)if(de||pe(),1<se.length){var c=le;i._showClone(e),i.options.animation&&!le&&c&&ce.forEach(function(t){i.addAnimationState({target:t,rect:ae}),t.fromRect=ae,t.thisAnimationDuration=null})}else i._showClone(e)}},dragOverAnimationCapture:function(t){var e=t.dragRect,n=t.isOwner,o=t.activeSortable;if(se.forEach(function(t){t.thisAnimationDuration=null}),o.options.animation&&!n&&o.multiDrag.isMultiDrag){ae=a({},e);var i=v(re,!0);ae.top-=i.f,ae.left-=i.e}},dragOverAnimationComplete:function(){de&&(de=!1,pe())},drop:function(t){var e=t.originalEvent,n=t.rootEl,o=t.parentEl,i=t.sortable,r=t.dispatchSortableEvent,a=t.oldIndex,l=t.putSortable,s=l||this.sortable;if(e){var c=this.options,u=o.children;if(!he)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),k(re,c.selectedClass,!~se.indexOf(re)),~se.indexOf(re))se.splice(se.indexOf(re),1),oe=null,N({sortable:i,rootEl:n,name:"deselect",targetEl:re,originalEvt:e});else{if(se.push(re),N({sortable:i,rootEl:n,name:"select",targetEl:re,originalEvt:e}),e.shiftKey&&oe&&i.el.contains(oe)){var d,h,f=F(oe),p=F(re);if(~f&&~p&&f!==p)for(d=f<p?(h=f,p):(h=p,f+1);h<d;h++)~se.indexOf(u[h])||(k(u[h],c.selectedClass,!0),se.push(u[h]),N({sortable:i,rootEl:n,name:"select",targetEl:u[h],originalEvt:e}))}else oe=re;ie=s}if(he&&this.isMultiDrag){if((o[j].options.sort||o!==n)&&1<se.length){var g=X(re),v=F(re,":not(."+this.options.selectedClass+")");if(!ue&&c.animation&&(re.thisAnimationDuration=null),s.captureAnimationState(),!ue&&(c.animation&&(re.fromRect=g,se.forEach(function(t){if(t.thisAnimationDuration=null,t!==re){var e=de?X(t):g;t.fromRect=e,s.addAnimationState({target:t,rect:e})}})),pe(),se.forEach(function(t){u[v]?o.insertBefore(t,u[v]):o.appendChild(t),v++}),a===F(re))){var m=!1;se.forEach(function(t){t.sortableIndex===F(t)||(m=!0)}),m&&r("update")}se.forEach(function(t){C(t)}),s.animateAll()}ie=s}(n===o||l&&"clone"!==l.lastPutMode)&&ce.forEach(function(t){t.parentNode&&t.parentNode.removeChild(t)})}},nullingGlobal:function(){this.isMultiDrag=he=!1,ce.length=0}
7632,destroyGlobal:function(){this._deselectMultiDrag(),s(document,"pointerup",this._deselectMultiDrag),s(document,"mouseup",this._deselectMultiDrag),s(document,"touchend",this._deselectMultiDrag),s(document,"keydown",this._checkKeyDown),s(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(void 0!==he&&he||ie!==this.sortable||t&&P(t.target,this.options.draggable,this.sortable.el,!1)||t&&0!==t.button))for(;se.length;){var e=se[0];k(e,this.options.selectedClass,!1),se.shift(),N({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:e,originalEvt:t})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},a(t,{pluginName:"multiDrag",utils:{select:function(t){var e=t.parentNode[j];e&&e.options.multiDrag&&!~se.indexOf(t)&&(ie&&ie!==e&&(ie.multiDrag._deselectMultiDrag(),ie=e),k(t,e.options.selectedClass,!0),se.push(t))},deselect:function(t){var e=t.parentNode[j],n=se.indexOf(t);e&&e.options.multiDrag&&~n&&(k(t,e.options.selectedClass,!1),se.splice(n,1))}},eventProperties:function(){var n=this,o=[],i=[];return se.forEach(function(t){var e;o.push({multiDragElement:t,index:t.sortableIndex}),e=de&&t!==re?-1:de?F(t,":not(."+n.options.selectedClass+")"):F(t),i.push({multiDragElement:t,index:e})}),{items:e(se),clones:[].concat(ce),oldIndicies:o,newIndicies:i}},optionListeners:{multiDragKey:function(t){return"ctrl"===(t=t.toLowerCase())?t="Control":1<t.length&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})}),Rt});; 7633/* AUTOGENERATED: scripts.js */ 7634/* vim: set ts=2 sw=2 sts=2 et: */ 7635 7636/** 7637 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 7638 * See https://www.x-cart.com/license-agreement.html for license details. 7639 */ 7640 7641/** 7642 * For the text input, set the handler that transforms the input's label depending on if the field is empty. 7643 * By default, text inputs should have placeholder and thus, labels can be transformed in CSS with a :placeholder-shown 7644 * rule. That handler should be set only for the fields w/o placeholders. 7645 * 7646 * @param {Element} el Text field. 7647 */ 7648const setLabelHandler = (el) => { 7649 if (el && !el.classList.contains('handled')) { 7650 const handleFocusedClass = () => { 7651 if (el.querySelector('option[selected]') && el.classList.contains('focused')) { 7652 return 7653 } 7654 el.classList.toggle('focused', !!el.value); 7655 }; 7656 7657 ['focus', 'blue', 'change'].forEach(event => { 7658 el.addEventListener(event, handleFocusedClass); 7659 }); 7660 7661 el.classList.add('handled'); 7662 handleFocusedClass(); 7663 } 7664}; 7665 7666xcart.microhandlers.add( 7667 'LabelHandler', 7668 '.field__field:not(.handled):not([placeholder])', 7669 function () { 7670 setLabelHandler(this); 7671 } 7672); 7673 7674xcart.registerTriggersBind( 7675 'update-product-page', 7676 function () { 7677 document.querySelectorAll('.field__field:not(.handled)').forEach(elem => { 7678 setLabelHandler(elem); 7679 }); 7680 } 7681); 7682 7683function setPasswordDifficultyColor(elem, difficulty) { 7684 elem.toggleClass('weak', (difficulty === 'Weak password')); 7685 elem.toggleClass('good', (difficulty === 'Good password')); 7686 elem.toggleClass('strong', (difficulty === 'Strong password')); 7687} 7688 7689xcart.microhandlers.add( 7690 'ProductSortHandler', 7691 '.sort-box:not(.handled)', 7692 function () { 7693 const labelContainer = this.querySelector('.sort-box__label-container'); 7694 7695 if (labelContainer) { 7696 labelContainer.addEventListener('click', () => { 7697 labelContainer.classList.toggle('sort-box__label-container--active'); 7698 }); 7699 7700 this.querySelectorAll('.sort-box__list-item-link').forEach(link => { 7701 link.addEventListener('click', () => { 7702 labelContainer.classList.remove('sort-box__label-container--active'); 7703 }); 7704 }); 7705 } 7706 7707 document.addEventListener('click', (e) => { 7708 if (e.target && !xcart.parents(e.target, '.sort-box').length) { 7709 this.querySelectorAll('.sort-box__label-container--active').forEach(elem => { 7710 elem.classList.remove('sort-box__label-container--active'); 7711 }); 7712 } 7713 }); 7714 7715 this.classList.add('handled'); 7716 } 7717); 7718 7719/** 7720 * Get the active window height - w/o the header area, bottom menu (in case it's visible), etc. 7721 * 7722 * @return {number} Active window height. 7723 */ 7724function getActiveWindowHeight() { 7725 window.activeWindowHeight = window.innerHeight; 7726 7727 const headerArea = document.getElementById('header-area'); 7728 if (headerArea) { 7729 window.activeWindowHeight -= headerArea.getBoundingClientRect().height; 7730 } 7731 7732 const bottomPanel = document.querySelector('.bottom-panel'); 7733 if (bottomPanel) { 7734 window.activeWindowHeight -= headerArea.getBoundingClientRect().height; 7735 } 7736 7737 document.dispatchEvent(new Event('calculateActiveWindowHeight')); // window.activeWindowHeight is expected to be 7738 // changed here. 7739 return window.activeWindowHeight; 7740} 7741 7742function getActiveWindowTop() { 7743 window.stickyWindowTop = 0; 7744 7745 const headerArea = document.getElementById('header-area'); 7746 if (headerArea) { 7747 window.stickyWindowTop += headerArea.getBoundingClientRect().height; 7748 } 7749 7750 document.dispatchEvent(new Event('calculateStickyWindowTop')); 7751 7752 return window.stickyWindowTop; 7753} 7754 7755function getPreloaderSVG() { 7756 return '<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" preserveAspectRatio="xMidYMid" style="margin:auto;background:0 0;display:block;
7756shape-rendering:auto" viewBox="0 0 100 100"><rect width="7" height="13" x="46.5" y="24.5" fill="currentColor" rx="3.5" ry="6.5"><animate attributeName="opacity" begin="-0.8888888888888888s" dur="1s" keyTimes="0;1" repeatCount="indefinite" values="1;0"/></rect><rect width="7" height="13" x="46.5" y="24.5" fill="currentColor" rx="3.5" ry="6.5" transform="rotate(40 50 50)"><animate attributeName="opacity" begin="-0.7777777777777778s" dur="1s" keyTimes="0;1" repeatCount="indefinite" values="1;0"/></rect><rect width="7" height="13" x="46.5" y="24.5" fill="currentColor" rx="3.5" ry="6.5" transform="rotate(80 50 50)"><animate attributeName="opacity" begin="-0.6666666666666666s" dur="1s" keyTimes="0;1" repeatCount="indefinite" values="1;0"/></rect><rect width="7" height="13" x="46.5" y="24.5" fill="currentColor" rx="3.5" ry="6.5" transform="rotate(120 50 50)"><animate attributeName="opacity" begin="-0.5555555555555556s" dur="1s" keyTimes="0;1" repeatCount="indefinite" values="1;0"/></rect><rect width="7" height="13" x="46.5" y="24.5" fill="currentColor" rx="3.5" ry="6.5" transform="rotate(160 50 50)"><animate attributeName="opacity" begin="-0.4444444444444444s" dur="1s" keyTimes="0;1" repeatCount="indefinite" values="1;0"/></rect><rect width="7" height="13" x="46.5" y="24.5" fill="currentColor" rx="3.5" ry="6.5" transform="rotate(200 50 50)"><animate attributeName="opacity" begin="-0.3333333333333333s" dur="1s" keyTimes="0;1" repeatCount="indefinite" values="1;0"/></rect><rect width="7" height="13" x="46.5" y="24.5" fill="currentColor" rx="3.5" ry="6.5" transform="rotate(240 50 50)"><animate attributeName="opacity" begin="-0.2222222222222222s" dur="1s" keyTimes="0;1" repeatCount="indefinite" values="1;0"/></rect><rect width="7" height="13" x="46.5" y="24.5" fill="currentColor" rx="3.5" ry="6.5" transform="rotate(280 50 50)"><animate attributeName="opacity" begin="-0.1111111111111111s" dur="1s" keyTimes="0;1" repeatCount="indefinite" values="1;0"/></rect><rect width="7" height="13" x="46.5" y="24.5" fill="currentColor" rx="3.5" ry="6.5" transform="rotate(320 50 50)"><animate attributeName="opacity" begin="0s" dur="1s" keyTimes="0;1" repeatCount="indefinite" values="1;0"/></rect></svg>'; 7757} 7758 7759/** 7760 * A $(<some HTML code>) analog. 7761 * 7762 * @param {string} html 7763 * 7764 * @return {Element} 7765 */ 7766xcart.createDOMTreeFromHTML = (html) => { 7767 const result = document.createElement('DIV'); 7768 result.innerHTML = html; 7769 7770 return result; 7771}; 7772 7773/** 7774 * Generate random ID for the DOM element. 7775 * 7776 * @param {string} [prefix] Random ID prefix. Optional. 7777 * @param {string} [postfix] Random ID postfix. Optional. 7778 * 7779 * @return {string} Randomly generated ID. 7780 */ 7781xcart.generateRandomId = (prefix, postfix) => { 7782 let result = prefix ? prefix : 'id'; 7783 7784 result += Math.round(Math.random() * 1000000000).toString(); 7785 7786 if (postfix) { 7787 result += postfix; 7788 } 7789 7790 return result; 7791}; 7792 7793window.options = {}; 7794 7795const phoneFieldHandler = (field) => { 7796 xcart.parents(field, '.wrapper-intl-phone-number').forEach(wrapper => { 7797 wrapper.classList.toggle('filled', !!field.value); 7798 }); 7799}; 7800 7801const handlePhoneField = (field) => { 7802 const fieldHandler = () => phoneFieldHandler(field); 7803 7804 fieldHandler(); 7805 field.addEventListener('focus', fieldHandler); 7806 field.addEventListener('blur', fieldHandler); 7807 field.addEventListener('input', fieldHandler); 7808 7809 field.classList.add('handled'); 7810 7811 xcart.parents(field, '.wrapper-intl-phone-number').forEach(container => { 7812 container.querySelectorAll('label.field__label').forEach(label => { 7813 label.setAttribute('for', field.getAttribute('id')); 7814 }); 7815 }); 7816}; 7817 7818xcart.microhandlers.add( 7819 'phonHandlers', 7820 '.iti .field-phone, .iti .xc-intl-phone-number', 7821 function () { 7822 handlePhoneField(this); 7823 } 7824); 7825 7826xcart.microhandlers.add( 7827 'selectFilledClass', 7828 'select:not([data-fill-handler])', 7829 function () { 7830 const handleFilledClass = () => { 7831 if (this.value && !this.classList.contains('filled')) { 7832 this.classList.add('filled'); 7833 7834 return; 7835 } 7836 7837 if (this.options) { 7838 for (let i = 0; i < this.options.length; i++) { 7839 if (!this.options[i].value && this.options[i].innerText.trim()) { 7840 if (!this.classList.contains('filled')) { 7841 this.classList.add('filled'); 7842 } 7843 7844 return; 7845 } 7846 } 7847 } 7848 7849 if (!this.value && this.classList.contains('filled')) { 7850 this.classList.remove('filled'); 7851 } 7852 }; 7853 7854 this.addEventListener('change', handleFilledClass); 7855 this.addEventListener('focus', handleFilledClass); 7856 this.addEventListener('blur', handleFilledClass); 7857 handleFilledClass(); 7858 this.setAttribute('data-fill-handler', '1'); 7859 } 7860); 7861 7862xcart.microhandlers.add( 7863 'ProductCellWidthHandler', 7864 '.product-cell', 7865 function () { 7866 const handler = () => { 7867 this.style.setProperty('--product-cell-width', Math.round(this.getBoundingClientRect().width) + 'px'); 7868 }; 7869 7870 if ('ResizeObserver' in window) { 7871 (new ResizeObserver(handler)).observe(this); 7872 } else { 7873 window.addEventListener('resize', handler, {passive: true}); 7874 window.addEventListener('orientationchange', handler, {passive: true}); 7875 } 7876 7877 handler(); 7878 } 7879); 7880 7881window.addEventListener('load', () => { 7882 document.querySelectorAll('.iti .field-phone, .iti .xc-intl-phone-number').forEach(field => { 7883 if (!field.classList.contains('handled')) { 7884 handlePhoneField(field); 7885 } 7886 }); 7887});; 7888/* AUTOGENERATED: dropdown.js */ 7889/* vim: set ts=2 sw=2 sts=2 et: */ 7890 7891/** 7892 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 7893 * See https://www.x-cart.com/license-agreement.html for license details. 7894 */ 7895 7896const Dropdown = function () { 7897 7898 let opened = null; 7899 7900 /** 7901 * @param {Element} dropdown 7902 * @return {boolean} 7903 */ 7904 this.isOpened = (dropdown) => { 7905 return dropdown && dropdown.classList.contains('opened'); 7906 }; 7907 7908 /** 7909 * @param {Element|string} dropdown Dropdown DOM node or its selector. 7910 */ 7911 this.open = (dropdown) => { 7912 if (typeof dropdown === 'string') { 7913 dropdown = document.querySelector(dropdown); 7914 } 7915 7916 if (dropdown && !this.isOpened(dropdown)) { 7917 if (opened && opened !== dropdown) { 7918 this.close(); 7919 } 7920 7921 opened = dropdown; 7922 dropdown.classList.add('opened'); 7923 document.documentElement.classList.add('dropdown-opened'); 7924 MobileMenu.getInstance().close(); 7925 } 7926 }; 7927 7928 /** 7929 * @param {Element|string} dropdown Dropdown DOM node or its selector. 7930 */ 7931 this.close = (dropdown) => { 7932 if (typeof dropdown === 'undefined') { 7933 dropdown = opened; 7934 } 7935 if (typeof dropdown === 'string') { 7936 dropdown = document.querySelector(dropdown); 7937 } 7938 7939 if (dropdown && this.isOpened(dropdown)) { 7940 dropdown.classList.remove('opened'); 7941 if (dropdown === opened) { 7942 opened = null; 7943 document.documentElement.classList.remove('dropdown-opened'); 7944 } 7945 } 7946 }; 7947}; 7948 7949xcart.dropdown = new Dropdown(); 7950 7951xcart.bind('mobile-menu.opened', () => { 7952 xcart.dropdown.close(); 7953});; 7954/* AUTOGENERATED: top-menu.js */ 7955/* vim: set ts=2 sw=2 sts=2 et: */ 7956 7957/** 7958 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 7959 * See https://www.x-cart.com/license-agreement.html for license details. 7960 */ 7961 7962const TopMenu = function () { 7963 7964 /** 7965 * Returns a DOM node or an element matching the selector. 7966 * 7967 * @param {Element|string} elem Element or an element selector. 7968 * 7969 * @return {Element|null} Element, null if selector is passed and there is no matching elements. 7970 */ 7971 const getElement = (elem) => { 7972 if (typeof elem === 'string') { 7973 elem = document.querySelector(elem); 7974 } 7975 7976 return elem; 7977 }; 7978 7979 this.close = (elem) => { 7980 if (elem) { 7981 elem.classList.remove('header-bar__column-list-item--active'); 7982 } 7983 }; 7984 7985 this.open = (elem) => { 7986 if (elem) { 7987 elem.classList.add('header-bar__column-list-item--active'); 7988 } 7989 }; 7990 7991 /** 7992 * @param {Element|string} elem 7993 * @return {boolean} 7994 */ 7995 this.isOpened = (elem) => { 7996 elem = getElement(elem); 7997 7998 return elem && elem.classList && elem.classList.contains('header-bar__column-list-item--active'); 7999 }; 8000 8001 /** 8002 * @return {NodeListOf<Element>} 8003 */ 8004 this.getOpenedMenus = () => { 8005 return document.querySelectorAll('#header-bar .header-bar__column-list-item--active'); 8006 }; 8007 8008 /** 8009 * 8010 * @param {Element|string} elem 8011 * @param {string} content 8012 */ 8013 this.setItemBadge = (elem, content) => { 8014 elem = getElement(elem); 8015 if (elem) { 8016 const btn = elem.classList.contains('header-bar__column-list-item-button') 8017 ? elem 8018 : elem.querySelector('.header-bar__column-list-item-button'); 8019 8020 if (btn) { 8021 let badge = btn.querySelector('.badge'); 8022 if (!badge && content) { 8023 badge = document.createElement('SPAN'); 8024 badge.classList.add('badge', 'header-bar__column-list-item-button-badge'); 8025 btn.appendChild(badge); 8026 } 8027 8028 if (content) { 8029 badge.innerHTML = content; 8030 } else if (badge) { 8031 btn.removeChild(badge); 8032 } 8033 } 8034 } 8035 }; 8036 8037 /** 8038 * @param {Element|null} exceptThis 8039 */ 8040 this.closeMenus = (exceptThis = null) => {
8041 this.getOpenedMenus().forEach(item => { 8042 if (item !== exceptThis && item.classList.contains('header-bar__column-list-item--active')) { 8043 xcart.trigger('top-menu-closed', {menu: item}); 8044 item.classList.remove('header-bar__column-list-item--active'); 8045 } 8046 }); 8047 }; 8048 8049 /** 8050 * @param {Element|string} elem 8051 * @param {boolean} open 8052 */ 8053 this.toggle = (elem, open) => { 8054 elem = getElement(elem); 8055 8056 if (elem) { 8057 const button = elem.querySelector(':scope > .header-bar__column-list-item-button'); 8058 if (typeof open === 'undefined') { 8059 open = !this.isOpened(elem); 8060 } 8061 8062 elem.classList.toggle('header-bar__column-list-item--active', open); 8063 if (button && !open) { 8064 button.blur(); 8065 } 8066 8067 this.closeMenus(elem); 8068 } 8069 }; 8070 8071 /** 8072 * @param {Element} elem 8073 * 8074 * @return boolean 8075 */ 8076 this.isOpened = (elem) => { 8077 return elem && elem.classList.contains('header-bar__column-list-item--active'); 8078 }; 8079 8080 /** 8081 * @param {Element|string} [root] 8082 */ 8083 this.updateButtonHandlers = (root) => { 8084 let furtherButtons; 8085 let backButtons; 8086 8087 if (root && typeof root === 'string') { 8088 furtherButtons = document.querySelectorAll(`${root} .top-menu__categories-item-further:not([data-handled])`); 8089 backButtons = document.querySelectorAll(`${root} .top-menu__categories-item-back:not([data-handled])`); 8090 } else if (root) { 8091 furtherButtons = root.querySelectorAll(`.top-menu__categories-item-further:not([data-handled])`); 8092 backButtons = root.querySelectorAll(`.top-menu__categories-item-back:not([data-handled])`); 8093 } else { 8094 furtherButtons = document.querySelectorAll('#header-bar .top-menu__categories-item-further:not([data-handled])'); 8095 backButtons = document.querySelectorAll('#header-bar .top-menu__categories-item-back:not([data-handled])'); 8096 } 8097 8098 furtherButtons.forEach(button => { 8099 button.addEventListener('click', () => { 8100 button.parentNode.classList.add('top-menu__categories-item--open'); 8101 button.parentNode.parentNode.classList.add('open'); 8102 }); 8103 8104 button.setAttribute('data-handled', true); 8105 }); 8106 8107 backButtons.forEach(button => { 8108 button.addEventListener('click', () => { 8109 const parentListItem = button.parentNode.parentNode.parentNode; 8110 8111 parentListItem.classList.remove('top-menu__categories-item--open'); 8112 parentListItem.parentNode.classList.remove('open'); 8113 }); 8114 }); 8115 }; 8116 8117 this.init = () => { 8118 document.querySelectorAll('.header-bar__column-list-item-button').forEach(button => { 8119 button.addEventListener('click', () => { 8120 this.toggle(button.parentNode); 8121 }); 8122 }); 8123 8124 document.addEventListener('click', (e) => { 8125 let clickedInSubmenu = null; 8126 let elem = e.target; 8127 8128 while (elem && elem.classList && !clickedInSubmenu) { 8129 if (elem.classList.contains('header-bar__column-list-item')) { 8130 clickedInSubmenu = elem; 8131 } 8132 elem = elem.parentNode; 8133 } 8134 8135 this.closeMenus(clickedInSubmenu); 8136 }); 8137 8138 this.updateButtonHandlers(); 8139 8140 xcart.bind('popup.open', () => { 8141 this.closeMenus(); 8142 }); 8143 8144 xcart.trigger('navbar.desktop.loaded'); 8145 }; 8146 8147}; 8148 8149TopMenu.prototype.instance = null; 8150 8151TopMenu.getInstance = () => { 8152 if (!TopMenu.prototype.instance) { 8153 TopMenu.prototype.instance = new TopMenu(); 8154 TopMenu.prototype.instance.init(); 8155 } 8156 8157 return TopMenu.prototype.instance; 8158}; 8159 8160TopMenu.getInstance(); 8161 8162(function () { 8163 const desktopModeSwitcherContainer = document.querySelector('.account-links__list-item--mode'); 8164 if (desktopModeSwitcherContainer) { 8165 const desktopModeSwitcher = desktopModeSwitcherContainer.querySelector('.switcher-container'); 8166 8167 if (desktopModeSwitcher) { 8168 desktopModeSwitcherContainer.addEventListener('click', (e) => { 8169 let hasClickedOnSwitcher = false;
8170 let elem = e.target; 8171 8172 while (elem) { 8173 if (elem === desktopModeSwitcher) { 8174 hasClickedOnSwitcher = true; 8175 break; 8176 } 8177 elem = elem.parentNode; 8178 } 8179 8180 if (!hasClickedOnSwitcher) { 8181 desktopModeSwitcher.click(); 8182 } 8183 }); 8184 } 8185 } 8186})();; 8187/* AUTOGENERATED: script.js */ 8188/* vim: set ts=2 sw=2 sts=2 et: */ 8189 8190/** 8191 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 8192 * See https://www.x-cart.com/license-agreement.html for license details. 8193 */ 8194 8195const MobileMenu = function () { 8196 const mobileMenuToggleButton = document.getElementById('main_menu'); 8197 const container = document.documentElement; 8198 const OPEN_CLASS = 'slidebar-open'; 8199 const mobileMenuRoot = document.getElementById('slidebar'); 8200 const itemsWithSubmenus = mobileMenuRoot ? mobileMenuRoot.querySelectorAll('.top-menu__item--has-submenu') : []; 8201 const mobileMenuHolder = mobileMenuRoot ? mobileMenuRoot.querySelector('.slidebar-list__holder') : null; 8202 const mobileMenuContainer = mobileMenuRoot ? mobileMenuRoot.querySelector('.slidebar-list__container') : null; 8203 const mobileMainMenu = mobileMenuRoot 8204 ? mobileMenuRoot.querySelector('.slidebar-list__holder > .slidebar-list') 8205 : null; 8206 const mobileMenuCategoriesItem = mobileMenuRoot ? mobileMenuRoot.querySelector('.top-menu__item--categories') : null; 8207 const mobileMenuBackButtons = mobileMenuRoot 8208 ? mobileMenuRoot.querySelectorAll('.top-menu__categories-item-back') 8209 : []; 8210 const SUBMENU_CLOSE_DURATION = 500; 8211 8212 let isMobileMenuOpen = false; 8213 8214 /** 8215 * @param {boolean} [open] Whether the menu should be open. 8216 */ 8217 this.toggle = (open) => { 8218 if (typeof open === 'undefined') { 8219 open = !isMobileMenuOpen; 8220 } 8221 8222 if (!isMobileMenuOpen && open) { 8223 this.switchToMainMenu(); 8224 } else if (isMobileMenuOpen && !open) { 8225 xcart.trigger('mobile-menu.item.selected', {item: null}); 8226 } 8227 8228 isMobileMenuOpen = open; 8229 container.classList.toggle(OPEN_CLASS, open); 8230 8231 xcart.trigger('mobile-menu.toggle', {open: open}); 8232 xcart.trigger(open ? 'mobile-menu.opened' : 'mobile-menu.closed'); 8233 }; 8234 8235 const adjustMobileMenuHolderHeight = (mobileMenu) => { 8236 if (mobileMenuHolder) { 8237 mobileMenu.style.minHeight = '0'; 8238 mobileMenuHolder.style.height = `${mobileMenu ? mobileMenu.scrollHeight : 0}px`; 8239 mobileMenu.style.minHeight = null; 8240 } 8241 }; 8242 8243 /** 8244 * @param {CallableFunction} callback 8245 */ 8246 const makeInstant = (callback) => { 8247 mobileMenuHolder.classList.add('slidebar--instant'); 8248 callback(); 8249 8250 requestAnimationFrame(() => { 8251 mobileMenuHolder.classList.remove('slidebar--instant'); 8252 }); 8253 }; 8254 8255 /** 8256 * @param {Element} item 8257 * @param {boolean} [instant] 8258 */ 8259 const openSubmenu = (item, instant = false) => { 8260 const subMenu = item.querySelector(':scope > .sublevel'); 8261 item.parentNode.classList.add('slidebar--open'); 8262 const scrolledBy = mobileMenuContainer.scrollTop; 8263 8264 if (!instant && scrolledBy > 0) { 8265 item.parentNode.style.top = `-${scrolledBy}px`; 8266 8267 if (subMenu) { 8268 subMenu.style.top = `${scrolledBy}px`; 8269 } 8270 8271 setTimeout(() => { 8272 item.parentNode.style.top = null; 8273 if (subMenu) { 8274 subMenu.style.top = null; 8275 } 8276 }, SUBMENU_CLOSE_DURATION); 8277 } 8278 8279 item.classList.add('top-menu__item--active'); 8280 adjustMobileMenuHolderHeight(subMenu ? subMenu : null); 8281 xcart.trigger('mobile-menu.item.selected', {item: item}); 8282 }; 8283 8284 /** 8285 * @param {Element} item 8286 */ 8287 const closeSubmenu = (item) => { 8288 const subLevelMenu = item.querySelector(':scope > .sublevel'); 8289 8290 if (subLevelMenu) { 8291 subLevelMenu.style.height = `${subLevelMenu.scrollHeight}px`; 8292 setTimeout(() => { 8293 subLevelMenu.style.height = null; 8294 }, SUBMENU_CLOSE_DURATION); 8295 } 8296 8297 item.parentNode.classList.remove('slidebar--open'); 8298 item.classList.remove('top-menu__item--active'); 8299 adjustMobileMenuHolderHeight(item.parentNode); 8300 }; 8301 8302 this.open = () => { 8303 adjustMobileMenuHolderHeight(mobileMainMenu); 8304 this.toggle(true); 8305 }; 8306 8307 this.close = () => { 8308 this.toggle(false); 8309 }; 8310 8311 this.switchToMainMenu = () => { 8312 if (mobileMenuRoot && mobileMenuHolder) { 8313 makeInstant(() => { 8314 mobileMenuRoot.querySelectorAll('.top-menu__item--active').forEach(elem => { 8315 elem.classList.remove('top-menu__item--active'); 8316 }); 8317 8318 mobileMenuRoot.querySelectorAll('.slidebar--open').forEach(elem => { 8319 elem.classList.remove('slidebar--open'); 8320 }); 8321 8322 mobileMenuHolder.style.height = null; 8323 }); 8324 8325 xcart.trigger('mobile-menu.item.selected', {item: null}); 8326 } 8327 }; 8328 8329 this.openCatalog = () => { 8330 if (!isMobileMenuOpen) { 8331 this.open(); 8332 } 8333 8334 makeInstant(() => { 8335 this.switchToMainMenu(); 8336 if (mobileMenuCategoriesItem) { 8337 openSubmenu(mobileMenuCategoriesItem, true); 8338 } 8339 }); 8340 }; 8341 8342 this.isCatalogOpened = () => { 8343 return isMobileMenuOpen 8344 && mobileMenuCategoriesItem 8345 && mobileMenuCategoriesItem.classList.contains('top-menu__item--active'); 8346 }; 8347 8348 this.init = () => { 8349 if (mobileMenuToggleButton) { 8350 mobileMenuToggleButton.addEventListener('click', (e) => { 8351 this.toggle(); 8352 e.preventDefault(); 8353 }); 8354 } 8355
8356 itemsWithSubmenus.forEach((item) => { 8357 item.firstElementChild.addEventListener('click', (e) => { 8358 openSubmenu(item); 8359 e.preventDefault(); 8360 e.stopPropagation(); 8361 }); 8362 }); 8363 8364 mobileMenuBackButtons.forEach((btn) => { 8365 btn.addEventListener('click', (e) => { 8366 closeSubmenu(btn.parentNode.parentNode.parentNode); 8367 e.stopPropagation(); 8368 }); 8369 }); 8370 8371 document.querySelectorAll('.top-menu__item--categories .top-menu__item--level-1 .top-menu__item--title').forEach( 8372 (item) => { 8373 item.addEventListener('click', () => { 8374 closeSubmenu(item.parentNode.parentNode); 8375 }); 8376 } 8377 ); 8378 8379 xcart.trigger('navbar.mobile.loaded'); 8380 }; 8381}; 8382 8383MobileMenu.prototype.instance = null; 8384 8385MobileMenu.getInstance = () => { 8386 if (!MobileMenu.prototype.instance) { 8387 MobileMenu.prototype.instance = new MobileMenu(); 8388 MobileMenu.prototype.instance.init(); 8389 } 8390 8391 return MobileMenu.prototype.instance; 8392}; 8393 8394MobileMenu.getInstance();; 8395/* AUTOGENERATED: popup.js */ 8396/* vim: set ts=2 sw=2 sts=2 et: */ 8397 8398/** 8399 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 8400 * See https://www.x-cart.com/license-agreement.html for license details. 8401 */ 8402 8403/* Wrap popups into a couple of containers, so we can center them using CSS only */ 8404xcart.bind('popup.open', () => { 8405 requestAnimationFrame(() => { 8406 if (popup.currentPopup && popup.currentPopup.widget) { 8407 const root = popup.currentPopup.widget[0]; 8408 let container = root.querySelector(':scope > .ui-dialog__container'); 8409 8410 if (root.children.length > 1 || !container) { 8411 if (!container) { 8412 container = document.createElement('DIV'); 8413 container.className = 'ui-dialog__container'; 8414 root.appendChild(container); 8415 } 8416 8417 let inner = container.querySelector(':scope > .ui-dialog__inner'); 8418 if (!inner) { 8419 inner = document.createElement('DIV'); 8420 inner.className = 'ui-dialog__inner'; 8421 container.appendChild(inner); 8422 } 8423 8424 let content = inner.querySelector(':scope > .ui-dialog__window'); 8425 if (!content) { 8426 content = document.createElement('DIV'); 8427 content.className = 'ui-dialog__window'; 8428 inner.appendChild(content); 8429 } 8430 8431 Array.from(root.childNodes).forEach(child => { 8432 if (child !== container) { 8433 content.appendChild(child); 8434 } 8435 }); 8436 8437 const quasiHeader = content.querySelector('.block.block-block > .head-h2, .popup-title-container'); 8438 if (quasiHeader) { 8439 const realTitle = root.querySelector('.ui-dialog-title'); 8440 if (realTitle) { 8441 realTitle.innerHTML = quasiHeader.innerHTML; 8442 } 8443 quasiHeader.parentNode.removeChild(quasiHeader); 8444 } 8445 } 8446 8447 if (!root.hasAttribute('data-popup-handled')) { 8448 root.setAttribute('data-popup-handled', '1'); 8449 root.addEventListener('click', (e) => { 8450 if ( 8451 e.target.classList.contains('ui-dialog__inner') 8452 || e.target.classList.contains('ui-dialog__container') 8453 || e.target.classList.contains('ui-dialog') 8454 ) { 8455 popup.close(); 8456 } 8457 }); 8458 } 8459 } 8460 }); 8461});; 8462/* AUTOGENERATED: tabs-navigation.js */ 8463/* vim: set ts=2 sw=2 sts=2 et: */ 8464 8465/** 8466 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 8467 * See https://www.x-cart.com/license-agreement.html for license details. 8468 */ 8469 8470/** 8471 * @param {{root: Element, prev?: Element, next?: Element, container: Element, list: Element, tabs: Element[]}} dom 8472 * @param {{scrollIntoViewOnClick: boolean}} options 8473 */ 8474function TabsNavigation(dom, options) { 8475 const updateNavButtonsState = () => { 8476 if (dom.container.scrollLeft > 5) { 8477 dom.prev.removeAttribute('disabled'); 8478 } else { 8479 dom.prev.setAttribute('disabled', 'disabled'); 8480 } 8481 8482 if (dom.container.scrollLeft + dom.container.getBoundingClientRect().width >= dom.container.scrollWidth - 5) { 8483 dom.next.setAttribute('disabled', 'disabled'); 8484 } else { 8485 dom.next.removeAttribute('disabled'); 8486 } 8487 }; 8488 8489 const getNavButtonIconHTML = () => { 8490 return '<svg aria-hidden="true" class="inline-icon inline-icon--arrow tabs-nav__btn-icon" width="24" height="24"' + 8491 ' viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">' + 8492 '<path d="M16.663 4.672a.933.933 0 0 1-.27.662l-6.807 6.8 6.807 6.8a.937.937 0 0 1-1.324
84921.325l-7.46-7.463a.933.933 0 0 ' + 8493 '1 0-1.324l7.46-7.463a.933.933 0 0 1 1.594.663Z">' + 8494 '</path></svg>'; 8495 }; 8496 8497 /** 8498 * @param {string} btnExtraClass 8499 * @param {string} accessibleText 8500 * 8501 * @return {Element} 8502 */ 8503 const getNavButtonElement = (btnExtraClass, accessibleText) => { 8504 const btn = document.createElement('BUTTON'); 8505 btn.setAttribute('class', `tabs-nav__btn ${btnExtraClass}`); 8506 btn.setAttribute('disabled', 'disabled'); 8507 btn.innerHTML = getNavButtonIconHTML(); 8508 8509 const accessible = document.createElement('SPAN'); 8510 accessible.innerHTML = accessibleText; 8511 accessible.setAttribute('class', 'visually-hidden'); 8512 btn.appendChild(accessible); 8513 8514 return btn; 8515 }; 8516 8517 const getPrevNavButtonElement = () => { 8518 return getNavButtonElement('tabs-nav__btn--prev', xcart.t('Previous tab')); 8519 }; 8520 8521 const getNextNavButtonElement = () => { 8522 return getNavButtonElement('tabs-nav__btn--next', xcart.t('Next tab')); 8523 }; 8524 8525 const setNavButtons = () => { 8526 dom.prev = getPrevNavButtonElement(); 8527 dom.next = getNextNavButtonElement(); 8528 8529 dom.container.parentElement.insertBefore(dom.prev, dom.container); 8530 dom.container.parentElement.appendChild(dom.next); 8531 }; 8532 8533 /** 8534 * @param {number} scrollBy 8535 */ 8536 const scroll = (scrollBy) => { 8537 dom.container.scrollLeft += scrollBy; 8538 }; 8539 8540 const getContainerPaddingRight = () => {
8541 let containerPaddingRight = parseInt(getComputedStyle(dom.container).paddingRight); 8542 if (!containerPaddingRight) { 8543 containerPaddingRight = 0; 8544 } 8545 8546 return Math.max( 8547 containerPaddingRight, 8548 dom.next.getBoundingClientRect().width 8549 ); 8550 }; 8551 8552 const getContainerPaddingLeft = () => { 8553 let containerPaddingLeft = parseInt(getComputedStyle(dom.container).paddingLeft); 8554 if (!containerPaddingLeft) { 8555 containerPaddingLeft = 0; 8556 } 8557 8558 return Math.max( 8559 containerPaddingLeft, 8560 dom.prev.getBoundingClientRect().width 8561 ); 8562 }; 8563 8564 const scrollRight = () => { 8565 let firstTab = null; 8566 const containerRect = dom.container.getBoundingClientRect(); 8567 const containerPaddingRight = getContainerPaddingRight(); 8568 8569 dom.tabs.forEach( 8570 (tab) => { 8571 if ( 8572 !firstTab 8573 && tab.getBoundingClientRect().right >= containerRect.right - containerPaddingRight 8574 ) { 8575 firstTab = tab; 8576 } 8577 } 8578 ); 8579 8580 if (firstTab) { 8581 scroll(firstTab.getBoundingClientRect().left - containerRect.left - getContainerPaddingLeft()); 8582 } 8583 }; 8584 8585 /** 8586 * @return {Element|null} 8587 */ 8588 const getActiveTab = () => { 8589 let result = null; 8590 8591 dom.tabs.forEach( 8592 (tab) => { 8593 if ( 8594 !result 8595 && ( 8596 tab.classList.contains('active') 8597 || tab.querySelector('.nav-link.active, [data-tab-navigator].active') 8598 ) 8599 ) { 8600 result = tab; 8601 } 8602 } 8603 ); 8604 8605 return result; 8606 }; 8607 8608 /** 8609 * @param {Element|null} tab 8610 */ 8611 const scrollTabIntoView = (tab) => { 8612 if (tab) { 8613 const activeTabRect = tab.getBoundingClientRect(); 8614 const containerRect = dom.container.getBoundingClientRect(); 8615 const containerPaddingLeft = getContainerPaddingLeft(); 8616 const containerPaddingRight = getContainerPaddingRight(); 8617 8618 if (activeTabRect.left < containerRect.left + containerPaddingLeft) { 8619 scroll(activeTabRect.left - containerRect.left - containerPaddingLeft); 8620 } else if (activeTabRect.right > containerRect.right - containerPaddingRight) { 8621 scroll(activeTabRect.right - containerRect.right + containerPaddingRight); 8622 } 8623 } 8624 }; 8625 8626 const scrollActiveTabIntoView = () => { 8627 scrollTabIntoView(getActiveTab()); 8628 }; 8629 8630 const scrollLeft = () => { 8631 let firstTab = null; 8632 const containerRect = dom.container.getBoundingClientRect(); 8633 const containerPaddingLeft = getContainerPaddingLeft(); 8634 8635 for (let i = dom.tabs.length - 1; i >= 0; i--) { 8636 if (dom.tabs[i].getBoundingClientRect().left <= (containerRect.left + containerPaddingLeft)) { 8637 firstTab = dom.tabs[i]; 8638 break; 8639 } 8640 } 8641 8642 if (firstTab) { 8643 scroll(getContainerPaddingRight() + firstTab.getBoundingClientRect().right - containerRect.right); 8644 } 8645 }; 8646 8647 const isListScrollable = () => { 8648 let result = false;
8649 const containerRect = dom.container.getBoundingClientRect(); 8650 dom.tabs.forEach( 8651 (tab) => { 8652 const tabRect = tab.getBoundingClientRect(); 8653 8654 if (tabRect.left < containerRect || tabRect.right > containerRect.right) { 8655 result = true; 8656 } 8657 } 8658 ); 8659 8660 return result; 8661 }; 8662 8663 const updateScrollableState = () => { 8664 const isScrollable = isListScrollable(); 8665 const hasScrollableClass = dom.root.classList.contains('tabs-nav--scrollable'); 8666 8667 if (isScrollable && !hasScrollableClass) { 8668 dom.root.classList.add('tabs-nav--scrollable'); 8669 } else if (!isScrollable && hasScrollableClass) { 8670 dom.root.classList.remove('tabs-nav--scrollable'); 8671 } 8672 }; 8673 8674 const resizeHandler = () => { 8675 updateNavButtonsState(); 8676 scrollActiveTabIntoView(); 8677 updateScrollableState(); 8678 }; 8679 8680 const setEventListeners = () => { 8681 dom.container.addEventListener('scroll', updateNavButtonsState, {passive: true}); 8682 8683 dom.next.addEventListener('click', scrollRight); 8684 dom.prev.addEventListener('click', scrollLeft); 8685 8686 dom.tabs.forEach( 8687 (tab) => { 8688 if (options.scrollIntoViewOnClick) { 8689 tab.addEventListener( 8690 'click', 8691 () => { 8692 scrollTabIntoView(tab); 8693 } 8694 ); 8695 } 8696 } 8697 ); 8698 8699 (new ResizeObserver(resizeHandler)).observe(dom.container); 8700 8701 resizeHandler(); 8702 document.addEventListener('DOMContentLoaded', resizeHandler); 8703 window.addEventListener('load', resizeHandler); 8704 }; 8705 8706 const init = () => { 8707 setNavButtons(); 8708 updateNavButtonsState(); 8709 setEventListeners(); 8710 }; 8711 8712 init(); 8713} 8714 8715xcart.microhandlers.add( 8716 'TabsNavigation', 8717 '[data-tabs-navigation]', 8718 function () { 8719 new TabsNavigation( 8720 { 8721 root: this, 8722 container: this.querySelector('[data-tabs-container]'), 8723 list: this.querySelector('[data-tabs-list]'), 8724 tabs: this.querySelectorAll('[data-tab]') 8725 }, 8726 { 8727 scrollIntoViewOnClick: this.hasAttribute('data-tabs-nav-scroll-to-view-on-click') 8728 } 8729 ); 8730 } 8731);; 8732/* AUTOGENERATED: ajax-categories.js */ 8733/* vim: set ts=2 sw=2 sts=2 et: */ 8734 8735/** 8736 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 8737 * See https://www.x-cart.com/license-agreement.html for license details. 8738 */ 8739 8740const AjaxCategories = function () { 8741 /** 8742 * @param {number} categoryId 8743 * @param {number} level 8744 * @param {string} mode 8745 * 8746 * @return {{url: string}} 8747 */ 8748 const getAjaxConfig = (categoryId, level, mode) => ( 8749 { 8750 url: xliteConfig.script + 8751 '?target=category&widget=\\XC\\AutoMobileSkin\\Module\\QSL\\FlyoutCategoriesMenu\\View\\TopCategories' + 8752 `&category_id=${categoryId}&level=${level}&mode=${mode}` 8753 } 8754 ); 8755 8756 /** 8757 * Render ajax category loader inside a DOM element. 8758 * 8759 * @param {Element} elem 8760 * @param {string} [tag] Loader root tag. Default - 'LI'. 8761 */ 8762 this.setLoadingState = (elem, tag) => { 8763 if (!tag) { 8764 tag = 'LI'; 8765 } 8766 8767 const root = document.createElement(tag); 8768 root.className = 'top-menu__categories-item--loader'; 8769 8770 const waitBlockOverlay = document.createElement('DIV'); 8771 waitBlockOverlay.className = 'wait-block-overlay'; 8772 root.appendChild(waitBlockOverlay); 8773 8774 const waitBlock = document.createElement('DIV'); 8775 waitBlock.className = 'wait-block'; 8776 waitBlock.appendChild(document.createElement('DIV')); 8777 waitBlockOverlay.appendChild(waitBlock); 8778 8779 const loader = document.createElement('SPAN'); 8780 loader.className = 'flyout-menu-category-loader'; 8781 loader.innerHTML = 'Loading'; 8782 waitBlockOverlay.appendChild(loader); 8783 8784 elem.appendChild(root); 8785 }; 8786 8787 /** 8788 * Remove ajax category loader from a DOM element. 8789 * 8790 * @param {Element} elem 8791 */ 8792 this.unsetLoadingState = (elem) => { 8793 elem.querySelectorAll('.top-menu__categories-item--loader').forEach((loader) => { 8794 loader.parentNode.removeChild(loader); 8795 }); 8796 }; 8797 8798 /** 8799 * @param {number} categoryId 8800 * @param {number} depth 8801 * @param {string} mode 8802 * @param {function} callback 8803 */ 8804 this.loadSubcategories = (categoryId, depth, mode, callback) => { 8805 jQuery.ajax( 8806 getAjaxConfig(categoryId, depth, mode) 8807 ).done( 8808 /** 8809 * @param {string} data 8810 */ 8811 (data) => { 8812 callback(data); 8813 } 8814 ); 8815 }; 8816 8817 /** 8818 * @param {Element} elem 8819 * @param {string} [mode] 8820 */
8821 const initCommonHandler = (elem, mode = 'desktop') => { 8822 elem.addEventListener('click', () => { 8823 const item = elem.nextElementSibling; 8824 8825 if ( 8826 item 8827 && !item.querySelector( 8828 '.top-menu__categories-item-link, .top-menu__categories-item--loader, .mobile-menu__categories-item-link' 8829 ) 8830 ) { 8831 this.setLoadingState(item); 8832 8833 this.loadSubcategories( 8834 parseInt(elem.getAttribute('data-category-id')), 8835 parseInt(elem.getAttribute('data-category-level')), 8836 mode, 8837 (data) => { 8838 this.unsetLoadingState(item); 8839 elem.removeAttribute('data-ajax-category'); 8840 8841 xcart.createDOMTreeFromHTML(data).querySelectorAll( 8842 '.top-menu__categories-item:not(.top-menu__categories-item--back), ' + 8843 '.mobile-menu__categories-item:not(.mobile-menu__categories-item--back)' 8844 ).forEach(child => { 8845 item.appendChild(child); 8846 }); 8847 8848 if (mode === 'mobile') { 8849 MobileCatalog.getInstance().updateHandlers(); 8850 } else { 8851 TopMenu.getInstance().updateButtonHandlers(item); 8852 } 8853 8854 this.init(); 8855 } 8856 ); 8857 } 8858 }); 8859 8860 elem.setAttribute('data-ajax-category-handled', ''); 8861 }; 8862 8863 /** 8864 * @param {Element} elem 8865 */ 8866 const initMobileHandler = (elem) => { 8867 initCommonHandler(elem, 'mobile'); 8868 }; 8869 8870 this.init = () => { 8871 document.querySelectorAll( 8872 '.top-menu__categories-item-further[data-ajax-category]:not([data-ajax-category-handled])' 8873 ).forEach((btn) => { 8874 initCommonHandler(btn); 8875 }); 8876 8877 document.querySelectorAll( 8878 '.mobile_header .mobile-menu__categories-item-link[data-ajax-category]:not([data-ajax-category-handled])' 8879 ).forEach((btn) => { 8880 initMobileHandler(btn); 8881 }); 8882 }; 8883}; 8884 8885AjaxCategories.prototype.instance = null; 8886 8887AjaxCategories.getInstance = () => { 8888 if (!AjaxCategories.prototype.instance) { 8889 AjaxCategories.prototype.instance = new AjaxCategories(); 8890 AjaxCategories.prototype.instance.init(); 8891 } 8892 8893 return AjaxCategories.prototype.instance; 8894}; 8895 8896document.addEventListener('DOMContentLoaded', function () { 8897 AjaxCategories.getInstance(); 8898});; 8899/* AUTOGENERATED: init.js */ 8900/* vim: set ts=2 sw=2 sts=2 et: */ 8901 8902/** 8903 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 8904 * See https://www.x-cart.com/license-agreement.html for license details. 8905 */ 8906 8907(function ($) { 8908 var body = $('body'), 8909 cloudSearchData = xcart.getCommentedData(body, 'cloudSearch') 8910 8911 window.Cloud_Search = { 8912 apiUrl: cloudSearchData.apiUrl, 8913 apiKey: cloudSearchData.apiKey, 8914 price_template: cloudSearchData.priceTemplate, 8915 selector: cloudSearchData.selector, 8916 lang: cloudSearchData.lng, 8917 EventHandlers: {OnPopupRender: []}, 8918 requestData: _.extend(cloudSearchData.requestData, document.documentElement.lang ? {lang: document.documentElement.lang} : {}), 8919 positionPopupAt: function (searchInput) { 8920 var elem = searchInput.closest('.simple-search-box') 8921 8922 return elem.length === 1 ? elem : searchInput 8923 }, 8924 pricesUrl: cloudSearchData.dynamicPricesEnabled 8925 ? URLHandler.buildURL({target: 'cloud_search_api', action: 'get_prices'}) 8926 : null 8927 } 8928})(jQuery);; 8929/* AUTOGENERATED: loader.js */ 8930/* vim: set ts=2 sw=2 sts=2 et: */ 8931 8932/** 8933 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 8934 * See https://www.x-cart.com/license-agreement.html for license details. 8935 */ 8936 8937(function () { 8938 var cs = document.createElement('script') 8939 cs.type = 'text/javascript' 8940 cs.async = true 8941 cs.src = 'https://cstatic.x-cart.com/cloud_search_xcart_v2.js' 8942 8943 var s = document.getElementsByTagName('script')[0] 8944 s.parentNode.insertBefore(cs, s) 8945})();; 8946/* AUTOGENERATED: scripts.js */ 8947/* vim: set ts=2 sw=2 sts=2 et: */ 8948 8949/** 8950 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 8951 * See https://www.x-cart.com/license-agreement.html for license details. 8952 */ 8953 8954document.querySelectorAll('.simple-search__back').forEach(btn => { 8955 btn.addEventListener('click', () => { 8956 const csCancelButton = document.querySelector('.cloud-search-mobile__cancel'); 8957 8958 if (csCancelButton) { 8959 csCancelButton.click(); 8960 } 8961 8962 document.documentElement.classList.remove('cs-mobile-open'); 8963 document.documentElement.classList.remove('cloud-search-mobile-open'); 8964 document.querySelectorAll('.cloud-search-mobile__input-clear--visible').forEach(block => { 8965 block.classList.remove('cloud-search-mobile__input-clear--visible'); 8966 }); 8967 }); 8968}); 8969 8970xcart.microhandlers.add( 8971 'simple-search-add-html-class', 8972 '#search_menu', 8973 function () { 8974 this.addEventListener('click', () => { 8975 document.documentElement.classList.add('cs-mobile-open'); 8976 }); 8977 } 8978); 8979 8980const csMobilePanelObserver = new MutationObserver(() => { 8981 const csInput = document.querySelector('.cloud-search-mobile__input'); 8982 8983 if (csInput && !document.querySelector('.cloud-search-mobile__input-clear')) { 8984 let btn = document.createElement('BUTTON'); 8985 const csInputField = csInput.querySelector('input[type="search"]'); 8986 const csCancelButton = document.querySelector('.cloud-search-mobile__cancel'); 8987 const originalInputField = document.querySelector('#mobile_search input[name="substring"]'); 8988 const submitBtn = document.querySelector('#mobile_search .simple-search__submit'); 8989 8990 csInputField.addEventListener('input', () => { 8991 btn.classList.toggle('cloud-search-mobile__input-clear--visible', !!csInputField.value); 8992 }); 8993 8994 btn.setAttribute('class', 'cloud-search-mobile__input-clear'); 8995 btn.addEventListener('click', (e) => { 8996 btn.classList.remove('cloud-search-mobile__input-clear--visible'); 8997 8998 if (csCancelButton) { 8999 csCancelButton.click(); 9000 } 9001 9002 csInputField.value = ''; 9003 csInputField.focus(); 9004 e.preventDefault(); 9005 }); 9006 9007 if (originalInputField && submitBtn && csInputField) { 9008 submitBtn.addEventListener('click', () => { 9009 originalInputField.value = csInputField.value; 9010 }); 9011 9012 csInputField.addEventListener('keypress', e => { 9013 if (e.key === 'Enter' || e.code === 'Enter') { 9014 submitBtn.click(); 9015 e.stopPropagation(); 9016 e.stopImmediatePropagation(); 9017 e.preventDefault(); 9018 } 9019 }); 9020 } 9021 9022 const standardClearButton = document.querySelector('.simple-search__clear'); 9023 if (standardClearButton) { 9024 btn.innerHTML = standardClearButton.innerHTML; 9025 } 9026 9027 csInputField.parentNode.appendChild(btn); 9028 csMobilePanelObserver.disconnect(); 9029 } 9030}); 9031 9032csMobilePanelObserver.observe( 9033 document.querySelector('body'), 9034 { 9035 attributes: false, 9036 characterData: false, 9037 childList: true, 9038 subtree: true 9039 } 9040);; 9041/* AUTOGENERATED: jquery.mmenu.min.all.js */ 9042/* 9043 * jQuery mmenu v5.3.3 9044 * @requires jQuery 1.7.0 or later 9045 * 9046 * mmenu.frebsite.nl 9047 * 9048 * Copyright (c) Fred Heusschen 9049 * www.frebsite.nl 9050 * 9051 * Licensed under the MIT license: 9052 * http://en.wikipedia.org/wiki/MIT_License 9053 */ 9054!function(e){var t,n,s,a,i="mmenu";e[i]||(e[i]=function(e,t,n){this.$menu=e,this._api=["bind","init","update","setSelected","getInstance","openPanel","closePanel","closeAllPanels"],this.opts=t,this.conf=n,this.vars={},this.cbck={},"function"==typeof this.___deprecated&&this.___deprecated(),this._initMenu(),this._initAnchors();var s=this.$menu.children(this.conf.panelNodetype);return this._initAddons(),this.init(s),"function"==typeof this.___debug&&this.___debug(),this},e[i].version="5.3.3",e[i].addons={},e[i].uniqueId=0,e[i].defaults={extensions:[],navbar:{add:!0,title:"Menu",titleLink:"panel"},onClick:{setSelected:!0},slidingSubmenus:!0},e[i].configuration={classNames:{divider:"Divider",inset:"Inset",panel:"Panel",selected:"Selected",spacer:"Spacer",vertical:"Vertical"},clone:!1,openingInterval:25,panelNodetype:"ul, ol, div",transitionDuration:400},e[i].prototype={init:function(e){e=e.not("."+t.nopanel),e=this._initPanels(e),this.trigger("init",e),this.trigger("update")},update:function(){this.trigger("update")},setSelected:function(e){this.$menu.find("."+t.listview).children().removeClass(t.selected),e.addClass(t.selected),this.trigger("setSelected",e)},openPanel:function(e){var n=e.parent();if(n.hasClass(t.vertical)){var s=n.parents("."+t.subopened);
9054if(s.length)return this.openPanel(s.first());n.addClass(t.opened)}else{if(e.hasClass(t.current))return;var a=this.$menu.children("."+t.panel),i=a.filter("."+t.current);a.removeClass(t.highest).removeClass(t.current).not(e).not(i).not("."+t.vertical).addClass(t.hidden),e.hasClass(t.opened)?e.nextAll("."+t.opened).addClass(t.highest).removeClass(t.opened).removeClass(t.subopened):(e.addClass(t.highest),i.addClass(t.subopened)),e.removeClass(t.hidden).addClass(t.current),setTimeout(function(){e.removeClass(t.subopened).addClass(t.opened)},this.conf.openingInterval)}this.trigger("openPanel",e)},closePanel:function(e){var n=e.parent();n.hasClass(t.vertical)&&(n.removeClass(t.opened),this.trigger("closePanel",e))},closeAllPanels:function(){this.$menu.find("."+t.listview).children().removeClass(t.selected).filter("."+t.vertical).removeClass(t.opened);var e=this.$menu.children("."+t.panel).first();this.$menu.children("."+t.panel).not(e).removeClass(t.subopened).removeClass(t.opened).removeClass(t.current).removeClass(t.highest).addClass(t.hidden),this.openPanel(e)},togglePanel:function(e){var n=e.parent();n.hasClass(t.vertical)&&this[n.hasClass(t.opened)?"closePanel":"openPanel"](e)},getInstance:function(){return this},bind:function(e,t){this.cbck[e]=this.cbck[e]||[],this.cbck[e].push(t)},trigger:function(){var e=Array.prototype.slice.call(arguments),t=e.shift();if(this.cbck[t])for(var n=0,s=this.cbck[t].length;n<s;n++)this.cbck[t][n].apply(this,e)},_initMenu:function(){this.opts.offCanvas&&this.conf.clone&&(this.$menu=this.$menu.clone(!0),this.$menu.add(this.$menu.find("[id]")).filter("[id]").each(function(){e(this).attr("id",t.mm(e(this).attr("id")))})),this.$menu.contents().each(function(){3==e(this)[0].nodeType&&e(this).remove()}),this.$menu.parent().addClass(t.wrapper);var n=[t.menu];this.opts.slidingSubmenus||n.push(t.vertical),this.opts.extensions=this.opts.extensions.length?"mm-"+this.opts.extensions.join(" mm-"):"",this.opts.extensions&&n.push(this.opts.extensions),this.$menu.addClass(n.join(" "))},_initPanels:function(s){var a=this,i=this.__findAddBack(s,"ul, ol");this.__refactorClass(i,this.conf.classNames.inset,"inset").addClass(t.nolistview+" "+t.nopanel),i.not("."+t.nolistview).addClass(t.listview);var l=this.__findAddBack(s,"."+t.listview).children();this.__refactorClass(l,this.conf.classNames.selected,"selected"),this.__refactorClass(l,this.conf.classNames.divider,"divider"),this.__refactorClass(l,this.conf.classNames.spacer,"spacer"),this.__refactorClass(this.__findAddBack(s,"."+this.conf.classNames.panel),this.conf.classNames.panel,"panel");var r=e(),d=s.add(s.find("."+t.panel)).add(this.__findAddBack(s,"."+t.listview).children().children(this.conf.panelNodetype)).not("."+t.nopanel);this.__refactorClass(d,this.conf.classNames.vertical,"vertical"),this.opts.slidingSubmenus||d.addClass(t.vertical),d.each(function(){var n=e(this),s=n;n.is("ul, ol")?(n.wrap('<div class="'+t.panel+'" />'),s=n.parent()):s.addClass(t.panel);var i=n.attr("id");n.removeAttr("id"),s.attr("id",i||a.__getUniqueId()),n.hasClass(t.vertical)&&(n.removeClass(a.conf.classNames.vertical),s.add(s.parent()).addClass(t.vertical)),r=r.add(s)});var o=e("."+t.panel,this.$menu);r.each(function(s){var i=e(this),l=(o=i.parent()).children("a, span").first();if(o.is("."+t.menu)||(o.data(n.sub,i),i.data(n.parent,o)),!o.children("."+t.next).length&&o.parent().is("."+t.listview)){var r=i.attr("id"),d=e('<a class="'+t.next+'" href="#'+r+'" data-target="#'+r+'" />').insertBefore(l);l.is("span")&&d.addClass(t.fullsubopen)}if(!i.children("."+t.navbar).length&&!o.hasClass(t.vertical)){if(o.parent().is("."+t.listview))var o=o.closest("."+t.panel);else o=(l=o.closest("."+t.panel).find('a[href="#'+i.attr("id")+'"]').first()).closest("."+t.panel);var c=e('<div class="'+t.navbar+'" />');if(o.length){r=o.attr("id");switch(a.opts.navbar.titleLink){case"anchor":_url=l.attr("href");break;case"panel":case"parent":_url="#"+r;break;case"none":default:_url=!1}var h=document.createElement("a");h.className=t.title,h.textContent=l.text(),_url&&(h.href=_url),c.append('<a class="'+t.btn+" "+t.prev+'" href="#'+r+'" data-target="#'+r+'"></a>').append(h).prependTo(i),a.opts.navbar.add&&i.addClass(t.hasnavbar)}else a.opts.navbar.title&&(c.append('<a class="'+t.title+'">'+a.opts.navbar.title+"</a>").prependTo(i),a.opts.navbar.add&&i.addClass(t.hasnavbar))}});var c=this.__findAddBack(s,"."+t.listview).children("."+t.selected).removeClass(t.selected).last(
9054).addClass(t.selected);c.add(c.parentsUntil("."+t.menu,"li")).filter("."+t.vertical).addClass(t.opened).end().not("."+t.vertical).each(function(){e(this).parentsUntil("."+t.menu,"."+t.panel).not("."+t.vertical).first().addClass(t.opened).parentsUntil("."+t.menu,"."+t.panel).not("."+t.vertical).first().addClass(t.opened).addClass(t.subopened)}),c.children("."+t.panel).not("."+t.vertical).addClass(t.opened).parentsUntil("."+t.menu,"."+t.panel).not("."+t.vertical).first().addClass(t.opened).addClass(t.subopened);var h=o.filter("."+t.opened);return h.length||(h=r.first()),h.addClass(t.opened).last().addClass(t.current),r.not("."+t.vertical).not(h.last()).addClass(t.hidden).end().appendTo(this.$menu),r},_initAnchors:function(){var n=this;a.$body.on(s.click+"-oncanvas","a[href]",function(s){var l=e(this),r=!1,d=n.$menu.find(l).length;for(var o in e[i].addons)if(r=e[i].addons[o].clickAnchor.call(n,l,d))break;if(!r&&d){var c=l.attr("href");if(c.length>1&&"#"==c.slice(0,1))try{var h=e(c,n.$menu);h.is("."+t.panel)&&(r=!0,n[l.parent().hasClass(t.vertical)?"togglePanel":"openPanel"](h))}catch(e){}}if(r&&s.preventDefault(),!r&&d&&l.is("."+t.listview+" > li > a")&&!l.is('[rel="external"]')&&!l.is('[target="_blank"]')){n.__valueOrFn(n.opts.onClick.setSelected,l)&&n.setSelected(e(s.target).parent());var u=n.__valueOrFn(n.opts.onClick.preventDefault,l,"#"==c.slice(0,1));u&&s.preventDefault(),n.__valueOrFn(n.opts.onClick.blockUI,l,!u)&&a.$html.addClass(t.blocking),n.__valueOrFn(n.opts.onClick.close,l,u)&&n.close()}})},_initAddons:function(){for(var t in e[i].addons)e[i].addons[t].add.call(this),e[i].addons[t].add=function(){};for(var t in e[i].addons)e[i].addons[t].setup.call(this)},__api:function(){var t=this,n={};return e.each(this._api,function(e){var s=this;n[s]=function(){var e=t[s].apply(t,arguments);return void 0===e?n:e}}),n},__valueOrFn:function(e,t,n){return"function"==typeof e?e.call(t[0]):void 0===e&&void 0!==n?n:e},__refactorClass:function(e,n,s){return e.filter("."+n).removeClass(n).addClass(t[s])},__findAddBack:function(e,t){return e.find(t).add(e.filter(t))},__filterListItems:function(e){return e.not("."+t.divider).not("."+t.hidden)},__transitionend:function(e,t,n){var a=!1,i=function(){a||t.call(e[0]),a=!0};e.one(s.transitionend,i),e.one(s.webkitTransitionEnd,i),setTimeout(i,1.1*n)},__getUniqueId:function(){return t.mm(e[i].uniqueId++)}},e.fn[i]=function(l,r){return function(){if(e[i].glbl)return;a={$wndw:e(window),$html:e("html"),$body:e("body")},t={},n={},s={},e.each([t,n,s],function(e,t){t.add=function(e){e=e.split(" ");for(var n=0,s=e.length;n<s;n++)t[e[n]]=t.mm(e[n])}}),t.mm=function(e){return"mm-"+e},t.add("wrapper menu panel nopanel current highest opened subopened navbar hasnavbar title btn prev next listview nolistview inset vertical selected divider spacer hidden fullsubopen"),t.umm=function(e){return"mm-"==e.slice(0,3)&&(e=e.slice(3)),e},n.mm=function(e){return"mm-"+e},n.add("parent sub"),s.mm=function(e){return e+".mm"},s.add("transitionend webkitTransitionEnd mousedown mouseup touchstart touchmove touchend click keydown"),e[i]._c=t,e[i]._d=n,e[i]._e=s,e[i].glbl=a}(),l=e.extend(!0,{},e[i].defaults,l),r=e.extend(!0,{},e[i].configuration,r),this.each(function(){var t=e(this);if(!t.data(i)){var n=new e[i](t,l,r);t.data(i,n.__api())}})},e[i].support={touch:"ontouchstart"in window||navigator.msMaxTouchPoints})}(jQuery); 9055/* 9056 * jQuery mmenu offCanvas addon 9057 * mmenu.frebsite.nl 9058 * 9059 * Copyright (c) Fred Heusschen 9060 */ 9061!function(t){var e="mmenu",o="offCanvas";t[e].addons[o]={setup:function(){if(this.opts[o]){var n=this.opts[o],i=this.conf[o];a=t[e].glbl,this._api=t.merge(this._api,["open","close","setPage"]),("top"==n.position||"bottom"==n.position)&&(n.zposition="front"),"string"!=typeof i.pageSelector&&(i.pageSelector="> "+i.pageNodetype),a.$allMenus=(a.$allMenus||t()).add(this.$menu),this.vars.opened=!1;var r=[s.offcanvas];"left"!=n.position&&r.push(s.mm(n.position)),"back"!=n.zposition&&r.push(s.mm(n.zposition)),this.$menu.addClass(r.join(" ")).parent().removeClass(s.wrapper),this.setPage(a.$page),this._initBlocker(),this["_initWindow_"+o](),this.$menu[i.menuInjectMethod+"To"](i.menuWrapperSelector)}},add:function(){s=t[e]._c,n=t[e]._d,i=t[e]._e,s.add("offcanvas slideout modal background opening blocker page"),n.add("style"),i.add("resize")},clickAnchor:function(t){if(!this.opts[o])return!1;var e=this.$menu.attr("id");if(e&&e.length&&(this.conf.clone&&(e=s.umm(e)),t.is('[href="#'+e+'"]')))return this.open(),!0;if(a.$page){var e=a.$page.first().attr("id");return e&&e.length&&t.is('[href="#'+e+'"]')?(this.close(),!0):!1}}},t[e].defaults[o]={position:"left",zposition:"back",modal:!1,moveBackgroun
9061d:!0},t[e].configuration[o]={pageNodetype:"div",pageSelector:null,wrapPageIfNeeded:!0,menuWrapperSelector:"body",menuInjectMethod:"prepend"},t[e].prototype.open=function(){if(!this.vars.opened){var t=this;this._openSetup(),setTimeout(function(){t._openFinish()},this.conf.openingInterval),this.trigger("open")}},t[e].prototype._openSetup=function(){var e=this;this.closeAllOthers(),a.$page.each(function(){t(this).data(n.style,t(this).attr("style")||"")}),a.$wndw.trigger(i.resize+"-offcanvas",[!0]);var r=[s.opened];this.opts[o].modal&&r.push(s.modal),this.opts[o].moveBackground&&r.push(s.background),"left"!=this.opts[o].position&&r.push(s.mm(this.opts[o].position)),"back"!=this.opts[o].zposition&&r.push(s.mm(this.opts[o].zposition)),this.opts.extensions&&r.push(this.opts.extensions),a.$html.addClass(r.join(" ")),setTimeout(function(){e.vars.opened=!0},this.conf.openingInterval),this.$menu.addClass(s.current+" "+s.opened)},t[e].prototype._openFinish=function(){var t=this;this.__transitionend(a.$page.first(),function(){t.trigger("opened")},this.conf.transitionDuration),a.$html.addClass(s.opening),this.trigger("opening")},t[e].prototype.close=function(){if(this.vars.opened){var e=this;this.__transitionend(a.$page.first(),function(){e.$menu.removeClass(s.current).removeClass(s.opened),a.$html.removeClass(s.opened).removeClass(s.modal).removeClass(s.background).removeClass(s.mm(e.opts[o].position)).removeClass(s.mm(e.opts[o].zposition)),e.opts.extensions&&a.$html.removeClass(e.opts.extensions),a.$page.each(function(){t(this).attr("style",t(this).data(n.style))}),e.vars.opened=!1,e.trigger("closed")},this.conf.transitionDuration),a.$html.removeClass(s.opening),this.trigger("close"),this.trigger("closing")}},t[e].prototype.closeAllOthers=function(){a.$allMenus.not(this.$menu).each(function(){var o=t(this).data(e);o&&o.close&&o.close()})},t[e].prototype.setPage=function(e){var n=this,i=this.conf[o];e&&e.length||(e=a.$body.find(i.pageSelector),e.length>1&&i.wrapPageIfNeeded&&(e=e.wrapAll("<"+this.conf[o].pageNodetype+" />").parent())),e.each(function(){t(this).attr("id",t(this).attr("id")||n.__getUniqueId())}),e.addClass(s.page+" "+s.slideout),a.$page=e,this.trigger("setPage",e)},t[e].prototype["_initWindow_"+o]=function(){a.$wndw.off(i.keydown+"-offcanvas").on(i.keydown+"-offcanvas",function(t){return a.$html.hasClass(s.opened)&&9==t.keyCode?(t.preventDefault(),!1):void 0});var t=0;a.$wndw.off(i.resize+"-offcanvas").on(i.resize+"-offcanvas",function(e,o){if(1==a.$page.length&&(o||a.$html.hasClass(s.opened))){var n=a.$wndw.height();(o||n!=t)&&(t=n,a.$page.css("minHeight",n))}})},t[e].prototype._initBlocker=function(){var e=this;a.$blck||(a.$blck=t('<div id="'+s.blocker+'" class="'+s.slideout+'" />')),a.$blck.appendTo(a.$body).off(i.touchstart+"-offcanvas "+i.touchmove+"-offcanvas").on(i.touchstart+"-offcanvas "+i.touchmove+"-offcanvas",function(t){t.preventDefault(),t.stopPropagation(),a.$blck.trigger(i.mousedown+"-offcanvas")}).off(i.mousedown+"-offcanvas").on(i.mousedown+"-offcanvas",function(t){t.preventDefault(),a.$html.hasClass(s.modal)||(e.closeAllOthers(),e.close())})};var s,n,i,a}(jQuery); 9062/* 9063 * jQuery mmenu autoHeight addon 9064 * mmenu.frebsite.nl 9065 * 9066 * Copyright (c) Fred Heusschen 9067 */ 9068!function(t){var e="mmenu",i="autoHeight";t[e].addons[i]={setup:function(){if(this.opts.offCanvas){switch(this.opts.offCanvas.position){case"left":case"right":return}var n=this,o=this.opts[i];if(this.conf[i],h=t[e].glbl,"boolean"==typeof o&&o&&(o={height:"auto"}),"object"!=typeof o&&(o={}),o=this.opts[i]=t.extend(!0,{},t[e].defaults[i],o),"auto"==o.height){this.$menu.addClass(s.autoheight);var u=function(t){var e=this.$menu.children("."+s.current);_top=parseInt(e.css("top"),10)||0,_bot=parseInt(e.css("bottom"),10)||0,this.$menu.addClass(s.measureheight),t=t||this.$menu.children("."+s.current),t.is("."+s.vertical)&&(t=t.parents("."+s.panel).not("."+s.vertical).first()),this.$menu.height(t.outerHeight()+_top+_bot).removeClass(s.measureheight)};this.bind("update",u),this.bind("openPanel",u),this.bind("closePanel",u),this.bind("open",u),h.$wndw.off(a.resize+"-autoheight").on(a.resize+"-autoheight",function(){u.call(n)})}}},add:function(){s=t[e]._c,n=t[e]._d,a=t[e]._e,s.add("autoheight measureheight"),a.add("resize")},clickAnchor:function(){}},t[e].defaults[i]={height:"default"};var s,n,a,h}(jQuery); 9069/* 9070 * jQuery mmenu backButton addon 9071 * mmenu.frebsite.nl 9072 * 9073 * Copyright (c) Fred Heusschen 9074 */ 9075!function(o){var t="mmenu",n="backButton";o[t].addons[n]={setup:function(){if(this.opts.offCanvas){var i=this,e=this.opts[n];if(this.conf[n],a=o[t].glbl,"boolean"==typeof e&&(e={close:e}),"object"!=typeof e&&(e={}),e=o.extend(!0,{},o[t].defaults[n],e),e.close){var c="#"+i.$menu.attr("id");this.bind("opened",function(){location.hash!=c&&history.pushState(null,document.title,c)}),o(window).on("popstate",function(o){a.$html.hasClass(s.opened)?(o.stopPropagation(),i.close()):location.hash==c&&(o.stopPropagation(),i.open())})}}},add:function(){return window.history&&window.history.pushState?(s=o[t]._c,i=o[t]._d,e=o[t]._e,void 0):(o[t].addons[n].setup=function(){},void 0)},clickAnchor:function(){}},o[t].defaults[n]={close:!1};var s,i,e,a}(jQuery); 9076/* 9077 * jQuery mmenu counters addon 9078 * mmenu.frebsite.nl 9079 * 9080 * Copyright (c) Fred Heusschen 9081 */ 9082!function(t){var n="mmenu",e="counters";t[n].addons[e]={setup:function(){var c=this,o=this.opts[e];this.conf[e],s=t[n].glbl,"boolean"==typeof o&&(o={add:o,update:o}),"object"!=typeof o&&(o={}),o=this.opts[e]=t.extend(!0,{},t[n].defaults[e],o),this.bind("init",function(n){this.__refactorClass(t("em",n),this.conf.classNames[e].counter,"counter")}),o.add&&this.bind("init",function(n){n.each(function(){var n=t(this).data(a.parent);
9082n&&(n.children("em."+i.counter).length||n.prepend(t('<em class="'+i.counter+'" />')))})}),o.update&&this.bind("update",function(){this.$menu.find("."+i.panel).each(function(){var n=t(this),e=n.data(a.parent);if(e){var s=e.children("em."+i.counter);s.length&&(n=n.children("."+i.listview),n.length&&s.html(c.__filterListItems(n.children()).length))}})})},add:function(){i=t[n]._c,a=t[n]._d,c=t[n]._e,i.add("counter search noresultsmsg")},clickAnchor:function(){}},t[n].defaults[e]={add:!1,update:!1},t[n].configuration.classNames[e]={counter:"Counter"};var i,a,c,s}(jQuery); 9083/* 9084 * jQuery mmenu dividers addon 9085 * mmenu.frebsite.nl 9086 * 9087 * Copyright (c) Fred Heusschen 9088 */ 9089!function(i){var e="mmenu",s="dividers";i[e].addons[s]={setup:function(){var n=this,a=this.opts[s];if(this.conf[s],l=i[e].glbl,"boolean"==typeof a&&(a={add:a,fixed:a}),"object"!=typeof a&&(a={}),a=this.opts[s]=i.extend(!0,{},i[e].defaults[s],a),this.bind("init",function(){this.__refactorClass(i("li",this.$menu),this.conf.classNames[s].collapsed,"collapsed")}),a.add&&this.bind("init",function(e){switch(a.addTo){case"panels":var s=e;break;default:var s=i(a.addTo,this.$menu).filter("."+d.panel)}i("."+d.divider,s).remove(),s.find("."+d.listview).not("."+d.vertical).each(function(){var e="";n.__filterListItems(i(this).children()).each(function(){var s=i.trim(i(this).children("a, span").text()).slice(0,1).toLowerCase();s!=e&&s.length&&(e=s,i('<li class="'+d.divider+'">'+s+"</li>").insertBefore(this))})})}),a.collapse&&this.bind("init",function(e){i("."+d.divider,e).each(function(){var e=i(this),s=e.nextUntil("."+d.divider,"."+d.collapsed);s.length&&(e.children("."+d.subopen).length||(e.wrapInner("<span />"),e.prepend('<a href="#" class="'+d.subopen+" "+d.fullsubopen+'" />')))})}),a.fixed){var o=function(e){e=e||this.$menu.children("."+d.current);var s=e.find("."+d.divider).not("."+d.hidden);if(s.length){this.$menu.addClass(d.hasdividers);var n=e.scrollTop()||0,t="";e.is(":visible")&&e.find("."+d.divider).not("."+d.hidden).each(function(){i(this).position().top+n<n+1&&(t=i(this).text())}),this.$fixeddivider.text(t)}else this.$menu.removeClass(d.hasdividers)};this.$fixeddivider=i('<ul class="'+d.listview+" "+d.fixeddivider+'"><li class="'+d.divider+'"></li></ul>').prependTo(this.$menu).children(),this.bind("openPanel",o),this.bind("init",function(e){e.off(t.scroll+"-dividers "+t.touchmove+"-dividers").on(t.scroll+"-dividers "+t.touchmove+"-dividers",function(){o.call(n,i(this))})})}},add:function(){d=i[e]._c,n=i[e]._d,t=i[e]._e,d.add("collapsed uncollapsed fixeddivider hasdividers"),t.add("scroll")},clickAnchor:function(i,e){if(this.opts[s].collapse&&e){var n=i.parent();if(n.is("."+d.divider)){var t=n.nextUntil("."+d.divider,"."+d.collapsed);return n.toggleClass(d.opened),t[n.hasClass(d.opened)?"addClass":"removeClass"](d.uncollapsed),!0}}return!1}},i[e].defaults[s]={add:!1,addTo:"panels",fixed:!1,collapse:!1},i[e].configuration.classNames[s]={collapsed:"Collapsed"};var d,n,t,l}(jQuery); 9090/* 9091 * jQuery mmenu dragOpen addon 9092 * mmenu.frebsite.nl 9093 * 9094 * Copyright (c) Fred Heusschen 9095 */ 9096!function(e){function t(e,t,n){return t>e&&(e=t),e>n&&(e=n),e}var n="mmenu",o="dragOpen";e[n].addons[o]={setup:function(){if(this.opts.offCanvas){var i=this,a=this.opts[o],p=this.conf[o];if(r=e[n].glbl,"boolean"==typeof a&&(a={open:a}),"object"!=typeof a&&(a={}),a=this.opts[o]=e.extend(!0,{},e[n].defaults[o],a),a.open){var d,f,c,u,h,l={},m=0,g=!1,v=!1,w=0,_=0;switch(this.opts.offCanvas.position){case"left":case"right":l.events="panleft panright",l.typeLower="x",l.typeUpper="X",v="width";break;case"top":case"bottom":l.events="panup pandown",l.typeLower="y",l.typeUpper="Y",v="height"}switch(this.opts.offCanvas.position){case"right":case"bottom":l.negative=!0,u=function(e){e>=r.$wndw[v]()-a.maxStartPos&&(m=1)};break;default:l.negative=!1,u=function(e){e<=a.maxStartPos&&(m=1)}}switch(this.opts.offCanvas.position){case"left":l.open_dir="right",l.close_dir="left";break;case"right":l.open_dir="left",l.close_dir="right";break;case"top":l.open_dir="down",l.close_dir="up";break;case"bottom":l.open_dir="up",l.close_dir="down"}switch(this.opts.offCanvas.zposition){case"front":h=function(){return this.$menu};break;default:h=function(){return e("."+s.slideout)}}var b=this.__valueOrFn(a.pageNode,this.$menu,r.$page);"string"==typeof b&&(b=e(b));var y=new Hammer(b[0],a.vendors.hammer);y.on("panstart",function(e){u(e.center[l.typeLower]),r.$slideOutNodes=h(),g=l.open_dir}).on(l.events+" panend",function(e){m>0&&e.preventDefault()}).on(l.events,function(e){if(d=e["delta"+l.typeUpper],l.negative&&(d=-d),d!=w&&(g=d>=w?l.open_dir:l.close_dir),w=d,w>a.threshold&&1==m){if(r.$html.hasClass(s.opened))return;m=2,i._openSetup(),i.trigger("opening"),r.$html.addClass(s.dragging),_=t(r.$wndw[v]()*p[v].perc,p[v].min,p[v].max)}2==m&&(f=t(w,10,_)-("front"==i.opts.offCanvas.zposition?_:0),l.negative&&(f=-f),c="translate"+l.typeUpper+"("+f+"px )",r.$slideOutNodes.css({"-webkit-transform":"-webkit-"+c,transform:c}))}).on("panend",function(){2==m&&(r.$html.removeClass(s.dragging),r.$slideOutNodes.css("transform",""),i[g==l.open_dir?"_openFinish":"close"]()),m=0})}}},add:function(){return"function"!=typeof Hammer||Hammer.VERSION<2?(e[n].addons[o].setup=function(){},void 0):(s=e[n]._c,i=e[n]._d,a=e[n]._e,s.add("dragging"),void 0)},clickAnchor:function(){}},e[n].defaults[o]={open:!1,maxStartPos:100,threshold:50,vendors:{hammer
9096:{}}},e[n].configuration[o]={width:{perc:.8,min:140,max:440},height:{perc:.8,min:140,max:880}};var s,i,a,r}(jQuery); 9097/* 9098 * jQuery mmenu fixedElements addon 9099 * mmenu.frebsite.nl 9100 * 9101 * Copyright (c) Fred Heusschen 9102 */ 9103!function(i){var s="mmenu",n="fixedElements";i[s].addons[n]={setup:function(){if(this.opts.offCanvas){this.opts[n],this.conf[n],o=i[s].glbl;var a=function(i){var s=this.conf.classNames[n].fixed;this.__refactorClass(i.find("."+s),s,"slideout").appendTo(o.$body)};a.call(this,o.$page),this.bind("setPage",a)}},add:function(){a=i[s]._c,t=i[s]._d,e=i[s]._e,a.add("fixed")},clickAnchor:function(){}},i[s].configuration.classNames[n]={fixed:"Fixed"};var a,t,e,o}(jQuery); 9104/* 9105 * jQuery mmenu iconPanels addon 9106 * mmenu.frebsite.nl 9107 * 9108 * Copyright (c) Fred Heusschen 9109 */ 9110!function(e){var n="mmenu",i="iconPanels";e[n].addons[i]={setup:function(){var a=this,l=this.opts[i];if(this.conf[i],d=e[n].glbl,"boolean"==typeof l&&(l={add:l}),"number"==typeof l&&(l={add:!0,visible:l}),"object"!=typeof l&&(l={}),l=this.opts[i]=e.extend(!0,{},e[n].defaults[i],l),l.visible++,l.add){this.$menu.addClass(s.iconpanel);for(var t=[],o=0;o<=l.visible;o++)t.push(s.iconpanel+"-"+o);t=t.join(" ");var c=function(n){var i=a.$menu.children("."+s.panel).removeClass(t),d=i.filter("."+s.subopened);d.removeClass(s.hidden).add(n).slice(-l.visible).each(function(n){e(this).addClass(s.iconpanel+"-"+n)})};this.bind("openPanel",c),this.bind("init",function(n){c.call(a,a.$menu.children("."+s.current)),l.hideNavbars&&n.removeClass(s.hasnavbar),n.each(function(){e(this).children("."+s.subblocker).length||e(this).prepend('<a href="#'+e(this).closest("."+s.panel).attr("id")+'" class="'+s.subblocker+'" />')})})}},add:function(){s=e[n]._c,a=e[n]._d,l=e[n]._e,s.add("iconpanel subblocker")},clickAnchor:function(){}},e[n].defaults[i]={add:!1,visible:3,hideNavbars:!1};var s,a,l,d}(jQuery); 9111/* 9112 * jQuery mmenu navbar addon 9113 * mmenu.frebsite.nl 9114 * 9115 * Copyright (c) Fred Heusschen 9116 */ 9117!function(n){var a="mmenu",e="navbars";n[a].addons[e]={setup:function(){var r=this,i=this.opts[e],c=this.conf[e];if(s=n[a].glbl,"undefined"!=typeof i){i instanceof Array||(i=[i]);var d={};n.each(i,function(s){var o=i[s];"boolean"==typeof o&&o&&(o={}),"object"!=typeof o&&(o={}),"undefined"==typeof o.content&&(o.content=["prev","title"]),o.content instanceof Array||(o.content=[o.content]),o=n.extend(!0,{},r.opts.navbar,o);var l=o.position,h=o.height;"number"!=typeof h&&(h=1),h=Math.min(4,Math.max(1,h)),"bottom"!=l&&(l="top"),d[l]||(d[l]=0),d[l]++;var f=n("<div />").addClass(t.navbar+" "+t.navbar+"-"+l+" "+t.navbar+"-"+l+"-"+d[l]+" "+t.navbar+"-size-"+h);d[l]+=h-1;for(var v=0,u=o.content.length;u>v;v++){var p=n[a].addons[e][o.content[v]]||!1;p?p.call(r,f,o,c):(p=o.content[v],p instanceof n||(p=n(o.content[v])),p.each(function(){f.append(n(this))}))}var b=Math.ceil(f.children().not("."+t.btn).length/h);b>1&&f.addClass(t.navbar+"-content-"+b),f.children("."+t.btn).length&&f.addClass(t.hasbtns),f.prependTo(r.$menu)});for(var o in d)r.$menu.addClass(t.hasnavbar+"-"+o+"-"+d[o])}},add:function(){t=n[a]._c,r=n[a]._d,i=n[a]._e,t.add("close hasbtns")},clickAnchor:function(){}},n[a].configuration[e]={breadcrumbSeparator:"/"},n[a].configuration.classNames[e]={panelTitle:"Title",panelNext:"Next",panelPrev:"Prev"};var t,r,i,s}(jQuery),/* 9118 * jQuery mmenu navbar addon breadcrumbs content 9119 * mmenu.frebsite.nl 9120 * 9121 * Copyright (c) Fred Heusschen 9122 */ 9123 function(n){var a="mmenu",e="navbars",t="breadcrumbs";n[a].addons[e][t]=function(e,t,r){var i=n[a]._c,s=n[a]._d;i.add("breadcrumbs separator"),e.append('<span class="'+i.breadcrumbs+'"></span>'),this.bind("init",function(a){a.removeClass(i.hasnavbar).each(function(){for(var a=[],e=n(this),t=n('<span class="'+i.breadcrumbs+'"></span>'),c=n(this).children().first(),d=!0;c&&c.length;){c.is("."+i.panel)||(c=c.closest("."+i.panel));var o=c.children("."+i.navbar).children("."+i.title).text();a.unshift(d?"<span>"+o+"</span>":'<a href="#'+c.attr("id")+'">'+o+"</a>"),d=!1,c=c.data(s.parent)}t.append(a.join('<span class="'+i.separator+'">'+r.breadcrumbSeparator+"</span>")).appendTo(e.children("."+i.navbar))})});var c=function(){var n=this.$menu.children("."+i.current),a=e.find("."+i.breadcrumbs),t=n.children("."+i.navbar).children("."+i.breadcrumbs);a.html(t.html())};this.bind("openPanel",c),this.bind("init",c)}}(jQuery),/* 9124 * jQuery mmenu navbar addon close content 9125 * mmenu.frebsite.nl 9126 * 9127 * Copyright (c) Fred Heusschen 9128 */ 9129 function(n){var a="mmenu",e="navbars",t="close";n[a].addons[e][t]=function(e){var t=n[a]._c,r=n[a].glbl;e.append('<a class="'+t.close+" "+t.btn+'" href="#"></a>');var i=function(n){e.find("."+t.close).attr("href","#"+n.attr("id"))};i.call(this,r.$page),this.bind("setPage",i)}}(jQuery),/* 9130 * jQuery mmenu navbar addon next content 9131 * mmenu.frebsite.nl 9132 * 9133 * Copyright (c) Fred Heusschen 9134 */ 9135 function(n){var a="mmenu",e="navbars",t="next";n[a].addons[e][t]=function(t){var r=n[a]._c;t.append('<a class="'+r.next+" "+r.btn+'" href="#"></a>');var i=function(n){n=n||this.$menu.children("."+r.current);var a=t.find("."+r.next),i=n.find("."+this.conf.classNames[e].panelNext),s=i.attr("href"),c=i.html();a[s?"attr":"removeAttr"]("href",s),a[s||c?"removeClass":"addClass"](r.hidden),a.html(c)};this.bind("openPanel",i),this.bind("init",function(){i.call(this)})}}(jQuery),/* 9136 * jQuery mmenu navbar addon prev content 9137 * mmenu.frebsite.nl 9138 * 9139 * Copyright (c) Fred Heusschen 9140 */ 9141 function(n){var a="mmenu",e="navbars",t="prev";n[a].addons[e][t]=function(t){var r=n[a]._c;t.append('<a class="'+r.prev+" "+r.btn+'" href="#"></a>'),this.bind("init",function(n){n.removeClass(r.hasnavbar)});var i=function(){var n=this.$menu.children("."+r.current),a=t.find("."+r.prev),i=n.find("."+this.conf.classNames[e].panelPrev);i.length||(i=n.children("."+r.navbar).children("."+r.prev));var s=i.attr("href"),c=i.html();a[s?"attr":"removeAttr"]("href",s),a[s||c?"removeClass":"addClass"](r.hidden),a.html(c)};this.bind("openPanel",i),this.bind("init",i)}}(jQuery),/* 9142 * jQuery mmenu navbar addon searchfield content 9143 * mmenu.frebsite.nl 9144 * 9145 * Copyright (c) Fred Heusschen 9146 */ 9147 function(n){var a="mmenu",e="navbars",t="searchfield";n[a].addons[e][t]=function(e){var t=n[a]._c,r=n('<div class="'+t.search+'" />').appendTo(e);"object"!=typeof this.opts.searchfield&&(this.opts.searchfield={}),this.opts.searchfield.add=!0,this.opts.searchfield.addTo=r}}(jQuery),/* 9148 * jQuery mmenu navbar addon title content 9149 * mmenu.frebsite.nl 9150 * 9151 * Copyright (c) Fred Heusschen 9152 */ 9153 function(n){var a="mmenu",e="navbars",t="title";n[a].addons[e][t]=function(t,r){var i=n[a]._c;t.append('<a class="'+i.title+'"></a>');var s=function(n){n=n||this.$menu.children("."+i.current);var a=t.find("."+i.title),s=n.find("."+this.conf.classNames[e].panelTitle);s.length||(s=n.children("."+i.navbar).children("."+i.title));var c=s.attr("href"),d=s.html()||r.title;a[c?"attr":"removeAttr"]("href",c),a[c||d?"removeClass":"addClass"](i.hidden),a.html(d)};
9153this.bind("openPanel",s),this.bind("init",function(){s.call(this)})}}(jQuery); 9154/* 9155 * jQuery mmenu searchfield addon 9156 * mmenu.frebsite.nl 9157 * 9158 * Copyright (c) Fred Heusschen 9159 */ 9160!function(e){function s(e){switch(e){case 9:case 16:case 17:case 18:case 37:case 38:case 39:case 40:return!0}return!1}var n="mmenu",a="searchfield";e[n].addons[a]={setup:function(){var o=this,d=this.opts[a],c=this.conf[a];r=e[n].glbl,"boolean"==typeof d&&(d={add:d}),"object"!=typeof d&&(d={}),d=this.opts[a]=e.extend(!0,{},e[n].defaults[a],d),this.bind("close",function(){this.$menu.find("."+t.search).find("input").blur()}),this.bind("init",function(n){if(d.add){switch(d.addTo){case"panels":var a=n;break;default:var a=e(d.addTo,this.$menu)}a.each(function(){var s=e(this);if(!s.is("."+t.panel)||!s.is("."+t.vertical)){if(!s.children("."+t.search).length){var n=c.form?"form":"div",a=e("<"+n+' class="'+t.search+'" />');if(c.form&&"object"==typeof c.form)for(var l in c.form)a.attr(l,c.form[l]);a.append('<input placeholder="'+d.placeholder+'" type="text" autocomplete="off" />'),s.hasClass(t.search)?s.replaceWith(a):s.prepend(a).addClass(t.hassearch)}if(d.noResults){var i=s.closest("."+t.panel).length;if(i||(s=o.$menu.children("."+t.panel).first()),!s.children("."+t.noresultsmsg).length){var r=s.children("."+t.listview).first();e('<div class="'+t.noresultsmsg+'" />').append(d.noResults)[r.length?"insertAfter":"prependTo"](r.length?r:s)}}}}),d.search&&e("."+t.search,this.$menu).each(function(){var n=e(this),a=n.closest("."+t.panel).length;if(a)var r=n.closest("."+t.panel),c=r;else var r=e("."+t.panel,o.$menu),c=o.$menu;var h=n.children("input"),u=o.__findAddBack(r,"."+t.listview).children("li"),f=u.filter("."+t.divider),p=o.__filterListItems(u),v="> a",m=v+", > span",b=function(){var s=h.val().toLowerCase();r.scrollTop(0),p.add(f).addClass(t.hidden).find("."+t.fullsubopensearch).removeClass(t.fullsubopen).removeClass(t.fullsubopensearch),p.each(function(){var n=e(this),a=v;(d.showTextItems||d.showSubPanels&&n.find("."+t.next))&&(a=m),e(a,n).text().toLowerCase().indexOf(s)>-1&&n.add(n.prevAll("."+t.divider).first()).removeClass(t.hidden)}),d.showSubPanels&&r.each(function(){var s=e(this);o.__filterListItems(s.find("."+t.listview).children()).each(function(){var s=e(this),n=s.data(l.sub);s.removeClass(t.nosubresults),n&&n.find("."+t.listview).children().removeClass(t.hidden)})}),e(r.get().reverse()).each(function(s){var n=e(this),i=n.data(l.parent);i&&(o.__filterListItems(n.find("."+t.listview).children()).length?(i.hasClass(t.hidden)&&i.children("."+t.next).not("."+t.fullsubopen).addClass(t.fullsubopen).addClass(t.fullsubopensearch),i.removeClass(t.hidden).removeClass(t.nosubresults).prevAll("."+t.divider).first().removeClass(t.hidden)):a||(n.hasClass(t.opened)&&setTimeout(function(){o.openPanel(i.closest("."+t.panel))},1.5*(s+1)*o.conf.openingInterval),i.addClass(t.nosubresults)))}),c[p.not("."+t.hidden).length?"removeClass":"addClass"](t.noresults),this.update()};h.off(i.keyup+"-searchfield "+i.change+"-searchfield").on(i.keyup+"-searchfield",function(e){s(e.keyCode)||b.call(o)}).on(i.change+"-searchfield",function(){b.call(o)})})}})},add:function(){t=e[n]._c,l=e[n]._d,i=e[n]._e,t.add("search hassearch noresultsmsg noresults nosubresults fullsubopensearch"),i.add("change keyup")},clickAnchor:function(){}},e[n].defaults[a]={add:!1,addTo:"panels",search:!0,placeholder:"Search",noResults:"No results found.",showTextItems:!1,showSubPanels:!0},e[n].configuration[a]={form:!1};var t,l,i,r}(jQuery); 9161/* 9162 * jQuery mmenu sectionIndexer addon 9163 * mmenu.frebsite.nl 9164 * 9165 * Copyright (c) Fred Heusschen 9166 */ 9167!function(e){var a="mmenu",r="sectionIndexer";e[a].addons[r]={setup:function(){var i=this,d=this.opts[r];this.conf[r],s=e[a].glbl,"boolean"==typeof d&&(d={add:d}),"object"!=typeof d&&(d={}),d=this.opts[r]=e.extend(!0,{},e[a].defaults[r],d),this.bind("init",function(a){if(d.add){switch(d.addTo){case"panels":var r=a;break;default:var r=e(d.addTo,this.$menu).filter("."+n.panel)}r.find("."+n.divider).closest("."+n.panel).addClass(n.hasindexer)}if(!this.$indexer&&this.$menu.children("."+n.hasindexer).length){this.$indexer=e('<div class="'+n.indexer+'" />').prependTo(this.$menu).append('<a href="#a">a</a><a href="#b">b</a><a href="#c">c</a><a href="#d">d</a><a href="#e">e</a><a href="#f">f</a><a href="#g">g</a><a href="#h">h</a><a href="#i">i</a><a href="#j">j</a><a href="#k">k</a><a href="#l">l</a><a href="#m">m</a><a href="#n">n</a><a href="#o">o</a><a href="#p">p</a><a href="#q">q</a><a href="#r">r</a><a href="#s">s</a><a href="#t">t</a><a href="#u">u</a><a href="#v">v</a><a href="#w">w</a><a href="#x">x</a><a href="#y">y</a><a href="#z">z</a>'),this.$indexer.children().on(t.mouseover+"-sectionindexer "+n.touchstart+"-sectionindexer",function(){var a=e(this).attr("href").slice(1),r=i.$menu.children("."+n.current),t=r.find("."+n.listview),s=!1,d=r.scrollTop(),h=t.position().top+parseInt(t.css("margin-top"),10)+parseInt(t.css("padding-top"),10)+d;r.scrollTop(0),t.children("."+n.divider).not("."+n.hidden).each(function(){s===!1&&a==e(this).text().slice(0,1).toLowerCase()&&(s=e(this).position().top+h)}),r.scrollTop(s!==!1?s:d)});var s=function(e){i.$menu[(e.hasClass(n.hasindexer)?"add":"remove")+"Class"](n.hasindexer)};this.bind("openPanel",s),s.call(this,this.$menu.children("."+n.current))}})},add:function(){n=e[a]._c,i=e[a]._d,t=e[a]._e,n.add("indexer hasindexer"),t.add("mouseover touchstart")},clickAnchor:function(e){return e.parent().is("."+n.indexer)?!0:void 0}},e[a].defaults[r]={add:!1,addTo:"panels"};var n,i,t,s}(jQuery); 9168/* 9169 * jQuery mmenu toggles addon 9170 * mmenu.frebsite.nl 9171 * 9172 * Copyright (c) Fred Heusschen 9173 */ 9174!function(t){var e="mmenu",c="toggles";t[e].addons[c]={setup:function(){var n=this;this.opts[c],this.conf[c],l=t[e].glbl,this.bind("init",function(e){this.__refactorClass(t("input",e),this.conf.classNames[c].toggle,"toggle"),this.__refactorClass(t("input",e),this.conf.classNames[c].check,"check"),t("input."+s.toggle+", input."+s.check,e).each(function(){var e=t(this),c=e.closest("li"),i=e.hasClass(s.toggle)?"toggle":"check",l=e.attr("id")||n.__getUniqueId();c.children('label[for="'+l+'"]').length||(e.attr("id",l),c.prepend(e),t('<label for="'+l+'" class="'+s[i]+'"></label>').insertBefore(c.children("a, span").last()))})})},add:function(){s=t[e]._c,n=t[e]._d,i=t[e]._e,s.add("toggle check")},clickAnchor:function(){}},t[e].configuration.classNames[c]={toggle:"Toggle",check:"Check"};var s,n,i,l}(jQuery);; 9175/* AUTOGENERATED: slidebar.js */ 9176/* vim: set ts=2 sw=2 sts=2 et: */ 9177 9178/** 9179 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 9180 * See https://www.x-cart.com/license-agreement.html for license details. 9181 */ 9182 9183function slidebar() { 9184 var self = this; 9185 jQuery(function () { 9186 xcart.trigger('mm-menu.before_create', jQuery('#slidebar')); 9187 jQuery('#slidebar').mmenu(self.options, self.configuration); 9188 9189 var api = jQuery('#slidebar').data('mmenu'); 9190 9191 if (!_.isUndefined(api)) { 9192 xcart.trigger('mm-menu.created', api); 9193 api.bind('closed', function () { 9194 api.closeAllPanels(); 9195 }); 9196 } 9197 9198 jQuery('.dropdown-menu#search_box').parent().on('shown.bs.dropdown', function () { 9199 jQuery('#header').addClass('hidden'); 9200 }); 9201 9202 jQuery('.dropdown-menu#search_box').parent().on('hidden.bs.dropdown', function () { 9203 jQuery('#header').removeClass('hidden'); 9204 }); 9205 }); 9206} 9207 9208slidebar.prototype.options = { 9209 extensions: ['pagedim-black'], 9210 navbar: { 9211 title: xcart.t('Menu') 9212 }, 9213 offCanvas: { 9214 pageSelector: "#page-wrapper" 9215 } 9216}; 9217 9218slidebar.prototype.configuration = { 9219 panelNodetype: "ul, ol" 9220}; 9221 9222xcart.bind('navbar.mobile.loaded', function () { 9223 xcart.autoload(slidebar); 9224});; 9225/* AUTOGENERATED: controller.js */ 9226/* vim: set ts=2 sw=2 sts=2 et: */ 9227 9228/** 9229 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 9230 * See https://www.x-cart.com/license-agreement.html for license details. 9231 */ 9232 9233var MESSAGE_INFO = 'info'; 9234var MESSAGE_WARNING = 'warning'; 9235var MESSAGE_ERROR = 'error'; 9236 9237/** 9238 * Controller 9239 */ 9240 9241// Constructor 9242function TopMessages(container) { 9243 if (!container) { 9244 return false;
9245 } 9246 9247 this.container = jQuery(container).eq(0); 9248 if (!this.container.length) { 9249 return false; 9250 } 9251 9252 this.messages = {}; 9253 9254 // Add listeners 9255 9256 // Close button 9257 jQuery('button.close', this.container).click( 9258 _.bind( 9259 function (event) { 9260 event.stopPropagation(); 9261 this.clearRecords(); 9262 9263 return false; 9264 }, 9265 this 9266 ) 9267 ).hover( 9268 function () { 9269 jQuery(this).addClass('close-hover'); 9270 }, 9271 function () { 9272 jQuery(this).removeClass('close-hover'); 9273 } 9274 ); 9275 9276 // Global event 9277 if ('undefined' != typeof (window.xcart)) { 9278 xcart.bind( 9279 'message', 9280 _.bind( 9281 function (event, data) { 9282 return this.messageHandler(data.message, data.type); 9283 }, 9284 this 9285 ) 9286 ); 9287 9288 xcart.bind( 9289 'messages', 9290 function (event, data) { 9291 for (var i in data) { 9292 xcart.trigger('message', data[i]); 9293 } 9294 } 9295 ); 9296 9297 xcart.bind( 9298 'clearMessages', 9299 _.bind( 9300 function (event) { 9301 this.clearRecords(); 9302 }, 9303 this 9304 ) 9305 ); 9306 } 9307 9308 // Remove dump items (W3C compatibility) 9309 jQuery('li.dump', this.container).remove(); 9310 9311 // Initial show 9312 if (!this.isVisible() && jQuery('li', this.container).length) { 9313 setTimeout( 9314 _.bind( 9315 function () { 9316 this.show(); 9317 9318 // Set initial timers 9319 jQuery('li.info', this.container).each( 9320 _.bind( 9321 function (idx, elm) { 9322 this.setTimer(elm); 9323 }, 9324 this 9325 ) 9326 ); 9327 }, 9328 this 9329 ), 9330 1000 9331 ); 9332 9333 } else { 9334 9335 // Set initial timers 9336 jQuery('li.info', this.container).each( 9337 _.bind( 9338 function (idx, elm) { 9339 this.setTimer(elm); 9340 }, 9341 this 9342 ) 9343 ); 9344 } 9345} 9346 9347/** 9348 * Properties 9349 */ 9350TopMessages.prototype.container = null; 9351TopMessages.prototype.to = null; 9352 9353TopMessages.prototype.ttl = 10000; 9354 9355/** 9356 * Methods 9357 */ 9358 9359// Check visibility 9360TopMessages.prototype.isVisible = function () { 9361 return this.container.css('display') != 'none'; 9362}; 9363 9364// Show widget 9365TopMessages.prototype.show = function () { 9366 this.container.slideDown(); 9367}; 9368 9369// Hide widget 9370TopMessages.prototype.hide = function (callback) { 9371 this.container.slideUp(callback); 9372}; 9373 9374TopMessages.prototype.getMessageFromText = function (element) { 9375 return element.find('.message').length > 0 9376 ? element.find('.message') 9377 : element; 9378}; 9379 9380TopMessages.prototype.getSameRecord = function (ul, text) { 9381 var self = this; 9382 9383 return ul.find('li').filter(function () { 9384 var htmlContent = jQuery('<div />').html(text); 9385 if (htmlContent.length > 0) { 9386 text = htmlContent.find('.message').length > 0 9387 ? htmlContent.find('.message').text() 9388 : text; 9389 } 9390 9391 if (text) { 9392 text = text.replace(/^[\s\n]+|[\s\n]+$/gm, ''); 9393 } 9394 9395 var realElement = self.getMessageFromText(jQuery(this)); 9396 var reg = new RegExp(text + ' \\\((\\\d*?)\\\)', 'i'); 9397 var realText = realElement.text().replace(/^[\s\n]+|[\s\n]+$/gm, ''); 9398 9399 return realText === text || realText.match(reg); 9400 }).get(0); 9401}; 9402 9403TopMessages.prototype.updateRecord = function (li) { 9404 var recordLi = jQuery(li).find('.message').length > 0 9405 ? jQuery(li).find('.message') 9406 : jQuery(li); 9407 var array = /(.*) \((\d*?)\)/i.exec(recordLi.text()); 9408 var oldText = array && array[1] 9409 ? array[1] 9410 : recordLi.text(); 9411 var oldIndex = array && array[2] 9412 ? array[2] 9413 : 0; 9414 9415 oldText = oldText.replace(/^[\s\n]+|[\s\n]+$/gm, ''); 9416 recordLi.text(oldText + ' (' + (intval(oldIndex) + 1) + ')'); 9417}; 9418 9419// Add record 9420TopMessages.prototype.addRecord = function (text, type) { 9421 if (!type 9422 || (MESSAGE_INFO != type && MESSAGE_WARNING != type && MESSAGE_ERROR != type) 9423 ) { 9424 type = MESSAGE_INFO; 9425 } 9426 9427 var ul = jQuery('ul', this.container).length 9428 ? jQuery('ul', this.container) 9429 : jQuery(document.createElement('UL')).appendTo(this.container); 9430 9431 var sameLi = this.getSameRecord(ul, text); 9432 var hash = objectHash.sha1({text: text, type: type}); 9433 9434 if (sameLi) { 9435 this.updateRecord(sameLi); 9436 li = sameLi; 9437 } else { 9438 var li = document.createElement('LI'); 9439 li.innerHTML = text; 9440 li.className = type; 9441 li.style.display = 'none'; 9442 9443 ul.append(li); 9444 } 9445 9446 li.hash = hash; 9447 this.messages[hash] = {text: text, type: type}; 9448 9449 if ( 9450 ul.find('li').length 9451 && !this.isVisible() 9452 ) { 9453 this.show(); 9454 } 9455 9456 jQuery(li).slideDown('fast'); 9457 9458 if (type == MESSAGE_INFO) { 9459 this.setTimer(li); 9460 } 9461}; 9462 9463// Clear record 9464TopMessages.prototype.hideRecord = function (li) { 9465 if (jQuery('li:not(.remove)', this.container).length == 1) { 9466 this.clearRecords(); 9467 9468 } else { 9469 jQuery(li).addClass('remove').slideUp( 9470 'fast', 9471 function () { 9472 jQuery(this).remove(); 9473 9474 if (this.messages && typeof li.hash !== 'undefined') { 9475 delete this.messages[li.hash]; 9476 } 9477 } 9478 ); 9479 } 9480}; 9481 9482// Clear all records 9483TopMessages.prototype.clearRecords = function () { 9484 var container = this.container; 9485 this.hide(function () { 9486 jQuery('li', container).remove(); 9487 this.messages = {}; 9488 }); 9489}; 9490 9491// Set record timer 9492TopMessages.prototype.setTimer = function (li) { 9493 li = jQuery(li).get(0); 9494 9495 if (li.timer) { 9496 clearTimeout(li.timer); 9497 li.timer = false;
9498 } 9499 9500 var o = this; 9501 li.timer = setTimeout( 9502 function () { 9503 o.hideRecord(li); 9504 }, 9505 this.ttl 9506 ); 9507}; 9508 9509TopMessages.prototype.hasVisibleMessages = function () { 9510 return Object.keys(this.messages).length > 0; 9511}; 9512 9513TopMessages.instance = null; 9514 9515// onmessage event handler 9516TopMessages.prototype.messageHandler = function (text, type) { 9517 this.addRecord(text, type); 9518}; 9519 9520jQuery(function () { 9521 TopMessages.instance = new TopMessages(jQuery('#status-messages')); 9522});; 9523/* AUTOGENERATED: button.js */ 9524/* vim: set ts=2 sw=2 sts=2 et: */ 9525 9526/** 9527 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 9528 * See https://www.x-cart.com/license-agreement.html for license details. 9529 */ 9530 9531function setFormAttribute(form, name, value) 9532{ 9533 form.elements[name].value = value; 9534} 9535 9536function setFormAction(form, action) 9537{ 9538 setFormAttribute('action', action); 9539} 9540 9541function submitForm(form, attrs) 9542{ 9543 jQuery.each( 9544 attrs, 9545 function (name, value) { 9546 var e = form.elements.namedItem(name); 9547 if (e) { 9548 e.value = value; 9549 } 9550 } 9551 ); 9552 9553 jQuery(form).submit(); 9554} 9555 9556function submitFormDefault(form, action) 9557{ 9558 var attrs = {}; 9559 if (typeof(action) != 'undefined' && action !== null) { 9560 attrs['action'] = action; 9561 } 9562 9563 submitForm(form, attrs); 9564} 9565 9566jQuery(document).ready(function () { 9567 jQuery('a.disabled').click(function(event){ 9568 event.preventDefault(); 9569 }); 9570});; 9571/* AUTOGENERATED: badge.js */ 9572/* vim: set ts=2 sw=2 sts=2 et: */ 9573 9574/** 9575 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 9576 * See https://www.x-cart.com/license-agreement.html for license details. 9577 */ 9578 9579jQuery(function () { 9580 var headerBar = $('.desktop-header'); 9581 headerBar.on('affix-top.bs.affix', function () { 9582 $(this).find('.header_paypal-icon span').fadeIn(); 9583 }); 9584 headerBar.on('affixed.bs.affix', function () { 9585 $(this).find('.header_paypal-icon span').fadeOut(); 9586 }); 9587});; 9588/* AUTOGENERATED: ga-search.js */ 9589/* vim: set ts=2 sw=2 sts=2 et: */ 9590 9591/** 9592 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 9593 * See https://www.x-cart.com/license-agreement.html for license details. 9594 */ 9595 9596define('googleAnalytics/base/searchEvent', [ 'googleAnalytics/event' ], function(Event) { 9597 return Event.extend({ 9598 namespace: 'search', 9599 9600 processReady () { 9601 jQuery('.search-product-form button[type=\'submit\'], .simple-search-product-form button[type=\'submit\']').click(_.bind(this.registerSearchSubstring, this)) 9602 }, 9603 9604 registerSearchSubstring (event) { 9605 var substring = jQuery(event.currentTarget).closest('form').find('input[name="substring"]').val() 9606 if (substring) { 9607 this.sendSearchSubstringEvent(substring, event) 9608 } 9609 }, 9610 9611 sendSearchSubstringEvent (substring, event) { 9612 } 9613 }); 9614});; 9615/* AUTOGENERATED: ga-search.js */ 9616/* vim: set ts=2 sw=2 sts=2 et: */ 9617 9618/** 9619 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 9620 * See https://www.x-cart.com/license-agreement.html for license details. 9621 */ 9622 9623define('googleAnalytics/searchEvent', [ 'googleAnalytics/base/searchEvent', 'googleAnalytics/event', 'googleAnalytics/core' ], function(GASearchEventBase, Event, gaCore) { 9624 9625 let GASearchEvent = GASearchEventBase.extend({ 9626 is_sent: false, 9627 9628 sendSearchSubstringEvent (substring, event) { 9629 var self = this 9630 if (self.is_sent || !gaCore.instance.isAvailable()) { 9631 return 9632 } 9633 event.preventDefault() 9634 self.sendEvent('search', { 9635 search_term: substring, 9636 event_callback () { 9637 self.createFunctionWithTimeout(function (e) { 9638 self.is_sent = true 9639 e.currentTarget.click() 9640 }, event, 1000) 9641 } 9642 }) 9643 } 9644 9645 }) 9646 9647 GASearchEvent.instance = new GASearchEvent(); 9648 9649 return GASearchEvent; 9650});; 9651/* AUTOGENERATED: text.js */ 9652/* vim: set ts=2 sw=2 sts=2 et: */ 9653 9654/** 9655 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 9656 * See https://www.x-cart.com/license-agreement.html for license details. 9657 */ 9658 9659xcart.bind( 9660 'load', 9661 function(event) { 9662 jQuery('.input-field-wrapper').each(function () { 9663 var obj = jQuery(this); 9664 9665 var inputField = jQuery('input,textarea', obj); 9666 var defaultValue = xcart.getCommentedData(obj, 'defaultValue'); 9667 var type = inputField.attr('type'); 9668 9669 if ( 9670 '' !== defaultValue 9671 && null !== defaultValue 9672 && 'checkbox' != type 9673 && 'radio' != type 9674 && 'file' != type 9675 && 'image' != type 9676 && 'submit' != type 9677 && 'button' != type 9678 ) { 9679 9680 if ('' === inputField.val()) { 9681 inputField.val(defaultValue).addClass('default-value'); 9682 } 9683 9684 inputField.click( 9685 function () { 9686 if (defaultValue === inputField.val()) { 9687 inputField.removeClass('default-value').val(''); 9688 } 9689 } 9690 ).blur( 9691 function () { 9692 if ('' === inputField.val()) { 9693 inputField.addClass('default-value').val(defaultValue); 9694 } 9695 } 9696 ); 9697 9698 inputField 9699 .parents('form') 9700 .submit( 9701 function() { 9702 if (defaultValue === inputField.val()) { 9703 inputField.val(''); 9704 } 9705 9706 return true; 9707 } 9708 ); 9709 } 9710 }); 9711 } 9712);; 9713/* AUTOGENERATED: layout_block_controller.js */ 9714/* vim: set ts=2 sw=2 sts=2 et: */ 9715 9716/** 9717 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 9718 * See https://www.x-cart.com/license-agreement.html for license details. 9719 */ 9720 9721if (_.isUndefined(jQuery.getQueryParameters)) { 9722 jQuery.extend({ 9723 getQueryParameters : function(str) { 9724 return (str || document.location.search).replace(/(^\?)/,'').split("&").map(function(n){return n = n.split("="),this[n[0]] = n[1],this}.bind({}))[0]; 9725 } 9726 }); 9727} 9728 9729function LayoutBlockWidget(base) 9730{ 9731 LayoutBlockWidget.superclass.constructor.apply(this, arguments); 9732 9733 this.widgetClass = this.base.data('widget'); 9734 9735 this.widgetTarget = xcart.getTarget(); 9736 9737 xcart.bind('layout.block.reload', _.bind(this.reload, this)); 9738 9739 this.base.data('controller', this); 9740} 9741 9742extend(LayoutBlockWidget, ALoadable); 9743 9744LayoutBlockWidget.prototype.reloadIfError = false;
9745 9746LayoutBlockWidget.prototype.shadeWidget = true; 9747 9748LayoutBlockWidget.prototype.defineWidgetParams = function() { 9749 return _.defaults( 9750 { 9751 'displayGroup': this.base.data('display') 9752 }, 9753 _.pick(jQuery.getQueryParameters(), (value, key, object) => { 9754 return key !== 'displayMode'; 9755 }) 9756 ); 9757}; 9758 9759LayoutBlockWidget.prototype.reload = function(event, args) { 9760 if (args.id === this.base.data('id') && this.base.data('is-reloaded-widget') === 1) { 9761 this.widgetParams = this.defineWidgetParams(); 9762 this.load(); 9763 } 9764}; 9765 9766// Place parsed request data into DOM 9767LayoutBlockWidget.prototype.insertIntoDOM = function(box) 9768{ 9769 this.base.find('.list-item-content').html(box); 9770 return this.base; 9771}; 9772 9773// Extract widget content 9774LayoutBlockWidget.prototype.extractContent = function(box) 9775{ 9776 box = jQuery(this.containerRequestPattern, box); 9777 return box.children(); 9778}; 9779 9780LayoutBlockWidget.autoload = function() { 9781 jQuery('.list-item[data-display]').each(function () { 9782 new LayoutBlockWidget(this); 9783 }); 9784}; 9785 9786xcart.autoload(LayoutBlockWidget);; 9787/* AUTOGENERATED: script.js */ 9788/* vim: set ts=2 sw=2 sts=2 et: */ 9789 9790/** 9791 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 9792 * See https://www.x-cart.com/license-agreement.html for license details. 9793 */ 9794 9795function myGarageReposition() { 9796 const win = window.innerWidth; 9797 const myGarageDesktop = jQuery('#my-garage-desktop'); 9798 const myGarageMobile = jQuery('#my-garage-mobile'); 9799 const myGarageDropdown = jQuery('#my-garage'); 9800 9801 if (win < 992) { 9802 if (!myGarageMobile.children().length) { 9803 myGarageMobile.html(myGarageDropdown.detach()); 9804 } 9805 } else { 9806 if (!myGarageDesktop.children().length) { 9807 myGarageDesktop.html(myGarageDropdown.detach()); 9808 } 9809 } 9810} 9811 9812window.addEventListener('resize', () => { 9813 myGarageReposition(); 9814}, {passive: true}); 9815 9816xcart.autoload(myGarageReposition); 9817 9818xcart.microhandlers.add( 9819 'remove-single-stored-selector', 9820 '.remove-single-stored-selector', 9821 function () { 9822 jQuery(this).click(function () { 9823 xcart.post(URLHandler.buildURL({ 9824 target: 'level_selector', 9825 action: 'remove_single_stored', 9826 selectorId: jQuery(this).data('selectorid') 9827 })); 9828 }); 9829 } 9830); 9831 9832xcart.microhandlers.add( 9833 'remove-all-stored-selectors', 9834 '.remove-all-stored-selectors', 9835 function () { 9836 jQuery(this).click(function () { 9837 const selectorIds = xcart.getCommentedData( 9838 jQuery(this).closest('.my-garage__dropdown'), 9839 'mmyStoredSelectors' 9840 ); 9841 9842 xcart.post(URLHandler.buildURL({ 9843 target: 'level_selector', 9844 action: 'remove_all_stored', 9845 selectorIds: selectorIds || null 9846 })); 9847 }); 9848 } 9849); 9850 9851xcart.bind('popup.close', () => { 9852 if (jQuery('.add-vehicle').length) { 9853 jQuery('.add-vehicle') 9854 .find('.level1-selector') 9855 .val('') 9856 .trigger('change'); 9857 } 9858});; 9859/* AUTOGENERATED: script.js */ 9860/* vim: set ts=2 sw=2 sts=2 et: */ 9861 9862/** 9863 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 9864 * See https://www.x-cart.com/license-agreement.html for license details. 9865 */ 9866 9867function AddVehiclePopupButton() 9868{ 9869 AddVehiclePopupButton.superclass.constructor.apply(this, arguments); 9870} 9871 9872extend(AddVehiclePopupButton, PopupButton); 9873AddVehiclePopupButton.prototype.pattern = '.add-vehicle-popup'; 9874AddVehiclePopupButton.prototype.callback = function(selector) 9875{ 9876 PopupButton.prototype.callback.apply(this, arguments); 9877} 9878 9879xcart.autoload(AddVehiclePopupButton);; 9880/* AUTOGENERATED: script.js */ 9881/* vim: set ts=2 sw=2 sts=2 et: */ 9882 9883/** 9884 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 9885 * See https://www.x-cart.com/license-agreement.html for license details. 9886 */ 9887 9888function SearchVINBlockView(base) 9889{ 9890 9891 var args = Array.prototype.slice.call(arguments, 0); 9892 this.callSupermethod('constructor', args); 9893 9894 this.form = this.base 9895 ? this.base.find('form').get(0) 9896 : null; 9897 9898 if (this.form) { 9899 this.setSelectorId(this.form); 9900 9901 jQuery(this.form).bind('beforeSubmit', _.bind(this.beforeSubmit, this)); 9902 9903 this.form.commonController.enableBackgroundSubmit( 9904 undefined, 9905 _.bind(this.handleResponse, this) 9906 ); 9907 9908 this.bindClearAction(base); 9909 9910 this.findButtonDisabler(this.form); 9911 } 9912 9913 const searchVehicleSwitcher = this.base.siblings('.search-vehicle-switcher'); 9914 searchVehicleSwitcher.find('.tag').click(function () { 9915 xcart.trigger('switchVINsearch'); 9916 }); 9917 9918 xcart.bind('switchVINsearch', _.bind(this.handleSwitch, this)); 9919} 9920 9921extend(SearchVINBlockView, ALoadable); 9922 9923SearchVINBlockView.autoload = function() 9924{ 9925 jQuery('.search-vehicle-block').each( 9926 function() { 9927 new SearchVINBlockView(this); 9928 } 9929 ); 9930}; 9931 9932xcart.microhandlers.add( 9933 'addVehiclePopup', 9934 '.add-vehicle', 9935 function () { 9936 let vinBlock = jQuery(this).find('.search-vehicle-block').get(0) 9937 jQuery('button.add-vehicle-popup').data('without-close', 'none'); /* Wrong logic in popup_button.js */ 9938 9939 setTimeout(function () { 9940 new SearchVINBlockView(vinBlock); 9941 }, 0); 9942 } 9943); 9944 9945// Widget target 9946SearchVINBlockView.prototype.widgetTarget = 'search_vehicle'; 9947 9948// Widget class name 9949SearchVINBlockView.prototype.widgetClass = '\\XC\\VINLookup\\View\\SearchVIN'; 9950 9951SearchVINBlockView.prototype.handleSwitch = function() { 9952 const $base = jQuery(this.base); 9953 let switcher = $base.siblings('.search-vehicle-switcher'); 9954 switcher.toggleClass('search-by-vin'); 9955 9956 let newTitle; 9957 if (switcher.hasClass('search-by-vin')) { 9958 newTitle = switcher.children('.vin-tag').html(); 9959 } else { 9960 newTitle = switcher.children('.mmy-tag').html(); 9961 } 9962 9963 this.switchLookupModeTitle(newTitle); 9964 9965 const isVinCodeFieldEmpty = !$base.find('input[name="vinCode"]').val(); 9966 const $submitBtn = $base.find('button[type="submit"]'); 9967 9968 $submitBtn.prop('disabled', isVinCodeFieldEmpty); 9969 $submitBtn.toggleClass('disabled', isVinCodeFieldEmpty); 9970 9971 $base.toggleClass('hidden'); 9972 $base.siblings('.levels-selectors').toggleClass('hidden'); 9973 $base.siblings('.find-level-button').toggleClass('hidden'); 9974 9975 if (!$base.hasClass('hidden')) { 9976 $base.siblings('label.add-to-garage').removeClass('disabled'); 9977 } else if ($base.siblings('.levels-selectors').find('.no-value-selected').length > 0) { 9978 $base.siblings('label.add-to-garage').addClass('disabled'); 9979 } 9980 9981 let mainCheckbox = $base.siblings('label.add-to-garage'); 9982 if ($base.find('label.add-to-garage').length === 0) { 9983 $base.find('button[type="submit"]').before(mainCheckbox.clone()); 9984 mainCheckbox.toggleClass('switch-sm-hide'); 9985 } else { 9986 mainCheckbox.toggleClass('switch-sm-hide'); 9987 } 9988} 9989 9990SearchVINBlockView.prototype.switchLookupModeTitle = function(newTitle) { 9991 const $base = jQuery(this.base); 9992 9993 let titleHeader = $base.siblings('.header-position-title'); 9994 let titleDialog = $base.closest('.ui-dialog').find('.ui-dialog-title'); 9995 let titleH3 = $base.closest('.block-level-selector').find('h3 .title .text'); 9996 9997 if (titleHeader.children('.active-level').length === 0) { 9998 titleHeader.children('.text').html(newTitle); 9999 titleDialog.html(newTitle); 10000 titleH3.html(newTitle); 10001 } 10002} 10003 10004SearchVINBlockView.prototype.findButtonDisabler = function(form) { 10005 let findBtn = jQuery(form).find('button[type="submit"]'); 10006 jQuery(form.elements.namedItem('vinCode')).on('keyup', function() { 10007 if ($(this).val().length === 0) { 10008 findBtn.addClass('disabled').prop('disabled', true); 10009 } else { 10010 findBtn.removeClass('disabled').prop('disabled', false); 10011 } 10012 }); 10013} 10014 10015SearchVINBlockView.prototype.setSelectorId = function(form) { 10016 let mainSelector = form.closest('.root-level-selector-box'); 10017 let selectorId = jQuery(mainSelector).data('selectorid'); 10018 10019 jQuery(form).find('input[name="selectorid"]').val(selectorId); 10020} 10021 10022SearchVINBlockView.prototype.beforeSubmit = function() { 10023 this.unmarkInvalidInput(); 10024 this.markAsInfoError(false); 10025 10026 this.fillCustomInputs(); 10027} 10028 10029SearchVINBlockView.prototype.handleResponse = function(event, result) { 10030 if (result.isValid && result.textStatus === 'success') { 10031 data = JSON.parse(result.data); 10032 10033 if (typeof(data.info) !== 'undefined') { 10034 this.processInfo(data); 10035 } else if (typeof(data.error) !== 'undefined') { 10036 this.processError(data); 10037 } else { 10038 this.processSuccess(data); 10039 } 10040 jQuery('button.submit', this.base).removeAttr('disabled'); 10041 } 10042} 10043 10044SearchVINBlockView.prototype.processSuccess = function(data) { 10045 xcart.trigger('switchVINsearch'); 10046 10047 let base = jQuery('.root-level-selector-box[data-selectorid=' + data.selectorId + ']'); 10048 10049 this.selectMMYFields(base, data.selected); 10050 this.changeTitle(base, data.titleText, data.levelName); 10051 this.showTooltipSelectSubmodel(data) 10052 10053 xcart.trigger('vinSuccessfullySelectedGA', { 10054 'data': data 10055 }) 10056} 10057 10058SearchVINBlockView.prototype.changeTitle = function(base, titleText, levelName) { 10059 let titleHeader = base.find('.header-position-title'); 10060 let titleH3 = base.closest('.block-level-selector').find('h3 .title'); 10061 this.previousTitle = titleHeader.html(); 10062 10063 titleHeader.addClass('active'); 10064 titleHeader.children('.text').html(titleText + ':'); 10065 titleHeader.children('.active-level').remove(); 10066 titleHeader.children('.text').after('<span class="active-level">' + levelName + '</span>'); 10067 10068 titleH3.children('.text').html(titleText + ':'); 10069 titleH3.children('.value').remove(); 10070 titleH3.children('.text').after('<span class="value">' + levelName + '</span>'); 10071} 10072 10073SearchVINBlockView.prototype.showTooltipSelectSubmodel = function (data) { 10074 if (data.showTooltipSelectSubmodel) { 10075 const tooltipSelector = $('.select_submodel_tooltip') 10076 tooltipSelector.show() 10077 xcart.trigger('disable-select-last-level-for-one-item') 10078 } 10079} 10080 10081SearchVINBlockView.prototype.bindClearAction = function(base) { 10082 const mainBlock = jQuery(base).parent(); 10083 mainBlock.find('.clear-active-selector').on('click', _.bind(function () { 10084 mainBlock.find('.header-position-title').html(this.previousTitle); 10085 }, this)); 10086}; 10087 10088SearchVINBlockView.prototype.temporaryDisableSelectorAutofocus = function ($selector) { 10089 const selector = $selector.get(0); 10090 10091 if (selector && selector.getAttribute('data-auto-focus')) { 10092 selector.setAttribute('data-auto-focus', '0'); 10093 } 10094}; 10095 10096SearchVINBlockView.prototype.selectMMYFields = function(base, selected) { 10097 for (let level in selected) { 10098 let levelIndex = parseInt(level); 10099 const $select = base.find('.level' + level + '-selector'); 10100 const root = this; 10101 10102 this.temporaryDisableSelectorAutofocus($select); 10103 10104 if (levelIndex === 1) { 10105 this.changeMMYFieldValue($select, selected[levelIndex].id); 10106 } else { 10107 xcart.bind( 10108 'reloadlevel' + levelIndex, 10109 _.once(function (event, data) { 10110 root.changeMMYFieldValue($select, selected[levelIndex].id); 10111 }) 10112 ); 10113 } 10114 } 10115} 10116 10117SearchVINBlockView.prototype.changeMMYFieldValue = function($select, value) 10118{ 10119 if (jQuery('option:not(.empty)', $select).length !== 1) { 10120 $select.val(value).change(); 10121 $select.trigger('chosen:updated'); 10122 } 10123} 10124 10125 10126SearchVINBlockView.prototype.processInfo = function(data) { 10127 this.markAsInfoError(true); 10128 this.markInvalidInput(data.info); 10129 this.removeErrorClasses(); 10130} 10131 10132SearchVINBlockView.prototype.processError = function(data) { 10133 this.markInvalidInput(data.error); 10134} 10135 10136SearchVINBlockView.prototype.markAsInfoError = function(info) { 10137 const $el = this.base.find('.vincode-value .input-field-wrapper'); 10138 $el.toggleClass('lookup-info-message', info); 10139} 10140 10141SearchVINBlockView.prototype.unmarkInvalidInput = function() { 10142 this.form.elements.namedItem('vinCode').unmarkAsInvalid(); 10143} 10144 10145SearchVINBlockView.prototype.markInvalidInput = function(message) { 10146 const input = this.form.elements.namedItem('vinCode'); 10147 jQuery(input).tooltip({ 10148 title: message, 10149 placement: 'bottom', 10150 trigger: 'manual' 10151 }); 10152 input.errorTooltipAssigned = true; 10153 input.markAsInvalid(message, null, true); 10154} 10155 10156SearchVINBlockView.prototype.fillCustomInputs = function() { 10157 const storeCheckbox = this.base.parent().find('.add-to-garage:visible').find('input.level-store'); 10158 if (storeCheckbox.length > 0) { 10159 jQuery(this.form).find('input[name="levelStore"]').val(store
10159Checkbox.prop('checked') ? 1 : 0); 10160 } 10161} 10162 10163SearchVINBlockView.prototype.removeErrorClasses = function() { 10164 this.base.find('.vin-search-box').removeClass('has-error'); 10165 this.base.find('.vincode-value .input-field-wrapper').removeClass('has-error'); 10166 this.base.find('.vincode-value input').removeClass('validation-error'); 10167} 10168 10169// Get event namespace (prefix) 10170SearchVINBlockView.prototype.getEventNamespace = function() { 10171 return 'search_vehicle'; 10172} 10173 10174xcart.microhandlers.add( 10175 'hideSelectSubmodelTooltip', 10176 '.level4-selector', 10177 function () { 10178 const selectSubmodelTooltip = $('.select_submodel_tooltip') 10179 const hideSelectSubmodelTooptip = () => { 10180 if (selectSubmodelTooltip.length) { 10181 selectSubmodelTooltip.hide() 10182 } 10183 } 10184 10185 $(document).on('blur change', '.level4-selector', function () { 10186 hideSelectSubmodelTooptip() 10187 }) 10188 } 10189); 10190 10191xcart.autoload(SearchVINBlockView);; 10192/* AUTOGENERATED: account-menu.js */ 10193/* vim: set ts=2 sw=2 sts=2 et: */ 10194 10195/** 10196 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 10197 * See https://www.x-cart.com/license-agreement.html for license details. 10198 */ 10199 10200xcart.bind('updateProductComparison', (e, data) => { 10201 const accountMenuLinks = document.querySelectorAll('.account-links__list-item--compare'); 10202 if (data && accountMenuLinks.length) { 10203 const total = (data.count && data.count > 0) ? data.count : 0; 10204 10205 accountMenuLinks.forEach(link => { 10206 link.classList.toggle('account-links__list-item--disabled', (total < 2)); 10207 let badge = link.querySelector('.account-links__list-item-badge'); 10208 10209 if (total > 0) { 10210 if (!badge) { 10211 badge = document.createElement('SPAN'); 10212 badge.className = 'account-links__list-item-badge'; 10213 link.querySelector('.account-links__list-item-link').appendChild(badge); 10214 } 10215 10216 badge.innerHTML = total; 10217 } else if (badge) { 10218 badge.parentNode.removeChild(badge); 10219 } 10220 }); 10221 } 10222});; 10223/* AUTOGENERATED: account-menu.js */ 10224/* vim: set ts=2 sw=2 sts=2 et: */ 10225 10226/** 10227 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 10228 * See https://www.x-cart.com/license-agreement.html for license details. 10229 */ 10230 10231xcart.bind('updateWishlistProductsCount', (e, data) => { 10232 const accountMenuLinks = document.querySelectorAll('.account-links__list-item--wishlist'); 10233 10234 if (data && data.hasOwnProperty('count') && accountMenuLinks.length) { 10235 accountMenuLinks.forEach(link => { 10236 let badge = link.querySelector('.account-links__list-item-badge'); 10237 10238 if (!badge) { 10239 badge = document.createElement('SPAN'); 10240 badge.className = 'account-links__list-item-badge'; 10241 link.querySelector('.account-links__list-item-link').appendChild(badge); 10242 } 10243 10244 badge.innerHTML = data.count; 10245 }); 10246 } 10247}); 10248 10249xcart.microhandlers.add( 10250 'WishlistMenuLinks', 10251 '.account-links__list-item--wishlist > a', 10252 function () { 10253 this.addEventListener( 10254 'click', 10255 (e) => { 10256 const parentClasses = this.parentNode.classList; 10257 10258 if (parentClasses.contains('must-be-logged-in') && parentClasses.contains('log-in')) { 10259 const loginButton = document.querySelector('.account-links__list-item--login button'); 10260 10261 if (loginButton) { 10262 loginButton.click(); 10263 e.preventDefault(); 10264 e.stopPropagation(); 10265 } 10266 } 10267 } 10268 ); 10269 } 10270);; 10271/* AUTOGENERATED: popup_button.js */ 10272/* vim: set ts=2 sw=2 sts=2 et: */ 10273 10274/** 10275 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 10276 * See https://www.x-cart.com/license-agreement.html for license details. 10277 */ 10278 10279xcart.autoload(PopupButton);; 10280/* AUTOGENERATED: minicart.js */ 10281/* vim: set ts=2 sw=2 sts=2 et: */ 10282 10283/** 10284 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 10285 * See https://www.x-cart.com/license-agreement.html for license details. 10286 */ 10287 10288/** 10289 * Controller 10290 */ 10291 10292function MinicartController(base) 10293{ 10294 this.callSupermethod('constructor', arguments); 10295 10296 if (this.base && this.base.length) { 10297 this.block = new MinicartView(this.base); 10298 xcart.bind(['updateCart', 'updateMiniCart'], _.bind(this.handleUpdate
10298Cart, this)); 10299 } 10300} 10301 10302extend(MinicartController, AController); 10303 10304// Controller name 10305MinicartController.prototype.name = 'MinicartController'; 10306 10307// Find pattern 10308MinicartController.prototype.findPattern = '.lc-minicart'; 10309 10310// Controller associated widget 10311MinicartController.prototype.block = null; 10312 10313// Initialize controller 10314MinicartController.prototype.initialize = function() 10315{ 10316 var o = this; 10317 10318 this.base.bind( 10319 'reload', 10320 function(event, box) { 10321 o.bind(box); 10322 } 10323 ); 10324} 10325 10326MinicartController.prototype.handleUpdateCart = function(event, data) 10327{ 10328 if (data.items || data.total) { 10329 if ('undefined' != typeof(data.itemsCount)) { 10330 this.updateItemsCount(data.itemsCount); 10331 } 10332 10333 this.block.load(); 10334 } 10335} 10336 10337MinicartController.prototype.updateItemsCount = function(count) 10338{ 10339 this.base.find('.minicart-items-number').html(count); 10340 10341 if (0 < count) { 10342 this.base.removeClass('empty'); 10343 this.base.find('.items-list') 10344 .removeClass('empty-cart') 10345 .addClass('full-cart'); 10346 10347 } else { 10348 this.base.addClass('empty'); 10349 this.base.find('.items-list') 10350 .removeClass('full-cart') 10351 .addClass('empty-cart'); 10352 this.block.toggleViewMode(false); 10353 } 10354 10355} 10356 10357/** 10358 * Widget 10359 */ 10360 10361function MinicartView(base) 10362{ 10363 this.callSupermethod('constructor', arguments); 10364 10365 this.bind('local.preload', _.bind(this.handlePreload, this)); 10366 this.bind('local.loadingError', _.bind(this.handleLoaded, this)); 10367} 10368 10369extend(MinicartView, ALoadable); 10370 10371// No shade widget 10372MinicartView.prototype.shadeWidget = false; 10373 10374// Widget target 10375MinicartView.prototype.widgetTarget = 'cart'; 10376 10377// Widget class name 10378MinicartView.prototype.widgetClass = '\\XLite\\View\\Minicart'; 10379 10380// Expanded mode flag 10381MinicartView.prototype.isExpanded = false; 10382 10383// Body handler is binded or not 10384MinicartView.prototype.bodyHandlerBinded = false; 10385 10386// Postprocess widget 10387MinicartView.prototype.postprocess = function(isSuccess) 10388{ 10389 this.callSupermethod('postprocess', arguments); 10390 10391 if (isSuccess) { 10392 10393 // Get display mode 10394 var re = /lc-minicart-([^ ]+)/; 10395 if (!this.widgetParams && this.base.attr('class') && -1 != this.base.attr('class').search(re)) { 10396 if (!this.widgetParams) { 10397 this.widgetParams = {}; 10398 } 10399 10400 var m = this.base.attr('class').match(re); 10401 this.widgetParams.displayMode = m[1]; 10402 } 10403 10404 // Initialize view mode toggle mechanism 10405 this.base.click(_.bind( 10406 function(event) { 10407 this.toggleViewMode(); 10408 }, 10409 this 10410 )); 10411 10412 if (!this.bodyHandlerBinded) { 10413 jQuery('body').click(_.bind( 10414 function (event) { 10415 if (event.target !== this.base.get(0) 10416 && !jQuery.contains(this.base.get(0), event.target) 10417 ) { 10418 this.toggleViewMode(false); 10419 } 10420 }, 10421 this 10422 )); 10423 10424 this.bodyHandlerBinded = true; 10425 } 10426 10427 jQuery('.items-list', this.base).click( 10428 function(event) { 10429 event.stopPropagation(); 10430 } 10431 ); 10432 10433 if (this.isExpanded) { 10434 this.base.addClass('expanded').removeClass('collapsed'); 10435 } 10436 10437 jQuery('a.item-attribute-values', this.base).map(function() { 10438 attachTooltip(jQuery('span', this), jQuery(jQuery(this).attr('data-rel')).html(), 'bottom'); 10439 }); 10440 } 10441}; 10442 10443MinicartView.prototype.handlePreload = function(event, state) 10444{ 10445 var box = this.base.find('.items-list'); 10446 10447 if (box.length) { 10448 var overlay = jQuery(document.createElement('div')); 10449 overlay 10450 .addClass('wait-overlay') 10451 .append('<div></div>'); 10452 box.append(overlay); 10453 } 10454}; 10455 10456MinicartView.prototype.handleLoaded = function(event, state) 10457{ 10458 this.base.find('.wait-overlay').remove(); 10459}; 10460 10461// Toggle view mode 10462MinicartView.prototype.toggleViewMode = function(expand) 10463{ 10464 var old = this.isExpanded; 10465 10466 if (expand !== true && expand !== false) { 10467 expand = !this.base.hasClass('expanded'); 10468 } 10469 10470 if (expand && this.base.hasClass('empty')) { 10471 expand = false; 10472 } 10473 10474 this.isExpanded = expand; 10475 10476 if (expand) { 10477 this.base.addClass('expanded').removeClass('collapsed'); 10478 if (old != this.isExpanded) { 10479 this.triggerVent('opened', this); 10480 } 10481 10482 } else { 10483 this.base.removeClass('expanded').addClass('collapsed'); 10484 if (old != this.isExpanded) { 10485 this.triggerVent('closed', this); 10486 } 10487 } 10488}; 10489 10490// Get event namespace (prefix) 10491MinicartView.prototype.getEventNamespace = function() 10492{ 10493 return 'minicart'; 10494}; 10495 10496xcart.autoload(MinicartController);; 10497/* AUTOGENERATED: minicart.js */ 10498/* vim: set ts=2 sw=2 sts=2 et: */ 10499 10500/** 10501 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 10502 * See https://www.x-cart.com/license-agreement.html for license details. 10503 */ 10504 10505const desktopHeader = document.querySelector('.desktop-header'); 10506 10507function materializeMinicart () { 10508 const rect = desktopHeader.getBoundingClientRect(); 10509 10510 // Hidden desktop header means there is a mobile view 10511 if (rect.width === 0 && rect.height === 0) { 10512 switchMinicarts('.mobile_header .lc-minicart-placeholder'); 10513 } else if (!desktopHeader.querySelector('.lc-minicart')) { 10514 switchMinicarts('.desktop-header .lc-minicart-placeholder'); 10515 } 10516} 10517 10518/** 10519 * @param {string} target 10520 */ 10521function switchMinicarts (target) { 10522 const placeholder = document.createElement('div'); 10523 const minicart = document.querySelector('.lc-minicart'); 10524 const targetElement = document.querySelector(target); 10525 10526 placeholder.classList.add('lc-minicart-placeholder'); 10527 if (minicart && targetElement) { 10528 minicart.after(placeholder); 10529 targetElement.replaceWith(minicart); 10530 } 10531} 10532 10533materializeMinicart(); 10534window.addEventListener('resize', materializeMinicart, {passive: true}); 10535 10536xcart.bind('updateCart', (e, data) => { 10537 if (typeof (data.itemsCount) !== 'undefined') { 10538 TopMenu.getInstance().setItemBadge( 10539 '.header-bar__column-list-item-button--cart', 10540 (data.itemsCount <= 9 ? data.itemsCount : '9+') 10541 ); 10542 } 10543});; 10544/* AUTOGENERATED: search.js */ 10545/* vim: set ts=2 sw=2 sts=2 et: */ 10546 10547/** 10548 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 10549 * See https://www.x-cart.com/license-agreement.html for license details. 10550 */ 10551 10552const Search = function () { 10553 const searchButton = document.getElementById('search_menu'); 10554 const container = document.querySelector('.mobile_header-search_menu'); 10555 const searchField = document.querySelector('.mobile_header input[name="substring"]'); 10556 const backButton = document.querySelector('.mobile_header .simple-search__back'); 10557 const clearButton = document.querySelector('.mobile_header .simple-search__clear'); 10558 10559 this.isShown = () => { 10560 return container && container.classList.contains('open'); 10561 }; 10562 10563 /** 10564 * @param {boolean} [show] 10565 */ 10566 this.toggle = (show) => { 10567 if (typeof show === 'undefined') { 10568 show = !this.isShown(); 10569 } 10570 10571 if (container) { 10572 container.classList.toggle('open', show); 10573 } 10574 searchButton.setAttribute('aria-expanded', show ? 'true' : 'false'); 10575 10576 const elementToFocus = show ? searchField : searchButton; 10577 if (elementToFocus) { 10578 elementToFocus.focus(); 10579 } 10580 }; 10581 10582 /** 10583 * @param {string} text 10584 */ 10585 this.setSearchQuery = (text) => { 10586 if (searchField) { 10587 searchField.value = text; 10588 } 10589 }; 10590 10591 this.show = () => { 10592 if (!this.isShown()) { 10593 this.setSearchQuery(''); 10594 } 10595 this.toggle(true); 10596 }; 10597 10598 this.hide = () => { 10599 this.toggle(false); 10600 }; 10601 10602 this.init = () => { 10603 if (searchButton) { 10604 searchButton.addEventListener('click', (e) => { 10605 this.show(); 10606 e.preventDefault(); 10607 }); 10608 } 10609 10610 if (backButton) { 10611 backButton.addEventListener('click', (e) => { 10612 this.hide(); 10613 e.preventDefault(); 10614 }); 10615 } 10616 10617 if (searchField) { 10618 searchField.addEventListener('keydown', (e) => { 10619 if (e.code === 'Escape') { 10620 this.hide(); 10621 e.preventDefault(); 10622 } 10623 }); 10624 10625 if (clearButton) { 10626 searchField.addEventListener('input', () => { 10627 clearButton.classList.toggle('simple-search__clear--visible', !!searchField.value); 10628 }); 10629 10630 clearButton.addEventListener('click', () => { 10631 clearButton.classList.remove('simple-search__clear--visible'); 10632 searchField.focus(); 10633 }); 10634 } 10635 } 10636 }; 10637}; 10638 10639Search.prototype.instance = null; 10640 10641Search.getInstance = () => { 10642 if (!Search.prototype.instance) { 10643 Search.prototype.instance = new Search(); 10644 Search.prototype.instance.init(); 10645 } 10646 10647 return Search.prototype.instance; 10648}; 10649 10650Search.getInstance();;
10651/* AUTOGENERATED: catalog.js */ 10652/* vim: set ts=2 sw=2 sts=2 et: */ 10653 10654/** 10655 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 10656 * See https://www.x-cart.com/license-agreement.html for license details. 10657 */ 10658 10659const MobileCatalog = function () { 10660 let items = []; 10661 let backButtons = []; 10662 let list = document.querySelector('.mobile-menu__categories'); 10663 const listWrapper = document.querySelector('.mobile-menu__categories-list > .dropdown-menu'); 10664 10665 let updateItemsList = () => { 10666 items = document.querySelectorAll( 10667 '.mobile-menu__categories-item--has-children > .mobile-menu__categories-item-link' 10668 ); 10669 backButtons = document.querySelectorAll('.mobile-menu__categories-item-back'); 10670 }; 10671 10672 /** 10673 * @param {Element} elem 10674 * @param {boolean} [open] 10675 */ 10676 this.toggle = (elem, open) => { 10677 let listItem = elem; 10678 if (listItem.classList.contains('mobile-menu__categories-item-link')) { 10679 listItem = listItem.parentNode; 10680 } 10681 10682 if (typeof open === 'undefined') { 10683 open = !this.isOpen(elem); 10684 } 10685 10686 const itemTitle = 10687 listItem.querySelector(':scope > .mobile-menu__categories-item-link > .mobile-menu__categories-item-title'); 10688 xcart.trigger( 10689 (open ? 'catalog.category.open' : 'catalog.category.close'), 10690 { 10691 mobile: true, 10692 item: listItem, 10693 title: itemTitle ? itemTitle.innerHTML : '' 10694 } 10695 ); 10696 10697 listItem.classList.toggle('mobile-menu__categories-item--open', open); 10698 if (listItem.classList.contains('mobile-menu__categories-item--level-1')) { 10699 list.classList.toggle('mobile-menu__categories--open', open); 10700 listWrapper.classList.toggle('open', open); 10701 } 10702 10703 if (!open) { 10704 this.closeSubmenus(listItem); 10705 } 10706 }; 10707 10708 /** 10709 * @param {Element} elem 10710 * @return {boolean} 10711 */ 10712 this.isOpen = (elem) => { 10713 return elem.parentNode.classList.contains('mobile-menu__categories-item--open'); 10714 }; 10715 10716 /** 10717 * @param {Element} elem 10718 */ 10719 this.close = (elem) => { 10720 this.toggle(elem, false); 10721 }; 10722 10723 /** 10724 * @param {Element} elem 10725 */ 10726 this.open = (elem) => { 10727 this.toggle(elem, true); 10728 }; 10729 10730 /** 10731 * @param {Element} elem 10732 */ 10733 this.closeSubmenus = (elem) => { 10734 elem.querySelectorAll('.mobile-menu__categories-item--open').forEach(item => { 10735 this.close(item); 10736 }); 10737 }; 10738 10739 this.closeAll = () => { 10740 this.closeSubmenus(listWrapper); 10741 }; 10742 10743 this.updateHandlers = () => { 10744 updateItemsList(); 10745 10746 items.forEach(item => { 10747 if (!item.hasAttribute('data-handled')) { 10748 item.addEventListener('click', (e) => { 10749 this.toggle(item); 10750 e.preventDefault(); 10751 }); 10752 } 10753 10754 item.setAttribute('data-handled', true); 10755 }); 10756 10757 backButtons.forEach(button => { 10758 if (!button.hasAttribute('data-handled')) { 10759 button.addEventListener('click', () => { 10760 this.close(button.parentNode.parentNode.parentNode); 10761 }); 10762 } 10763 10764 button.setAttribute('data-handled', true); 10765 }); 10766 }; 10767 10768 this.init = () => { 10769 this.updateHandlers(); 10770 }; 10771 10772 this.updateMobileMenuList = () => { 10773 list = document.querySelector('.mobile-menu__categories'); 10774 }; 10775}; 10776 10777MobileCatalog.prototype.instance = null; 10778 10779MobileCatalog.getInstance = () => { 10780 if (!MobileCatalog.prototype.instance) { 10781 MobileCatalog.prototype.instance = new MobileCatalog(); 10782 MobileCatalog.prototype.instance.init(); 10783 } 10784 10785 return MobileCatalog.prototype.instance; 10786}; 10787 10788MobileCatalog.getInstance();; 10789/* AUTOGENERATED: jquery.listItem.js */ 10790/* vim: set ts=2 sw=2 sts=2 et: */ 10791 10792/** 10793 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 10794 * See https://www.x-cart.com/license-agreement.html for license details. 10795 */ 10796 10797(function ($) { 10798 var undefined; 10799 10800 var options = { 10801 prefix: 'list-item__' 10802 }; 10803 10804 var focusAction = function (element) { 10805 let stickyElements = []; 10806 const additionalSpace = 20; 10807 const elem = element.get(0); 10808 const scrollStart = window.pageYOffset; 10809 let elemStartPosition = elem.getBoundingClientRect().top; 10810 let scrollBy = 0; 10811 let scrolledByOnPreviousStep = null; 10812 let elemTopOnPreviousStep = null; 10813 10814 const recalculateScrollCoords = function() { 10815 window.themeTweakerStickyElements = [ 10816 '.desktop-header', 10817 '.themetweaker-panel--header' 10818 ]; 10819 const evt = new CustomEvent('themeTweakerStickyElementsCollect'); 10820 window.dispatchEvent(evt); 10821 stickyElements = window.themeTweakerStickyElements.slice(0, window.themeTweakerStickyElements.length); 10822 const elemCurrentTop = elem.getBoundingClientRect().top; 10823 if ( 10824 scrolledByOnPreviousStep !== null 10825 && elemTopOnPreviousStep !== null 10826 && elemCurrentTop !== elemTopOnPreviousStep - scrolledByOnPreviousStep 10827 ) { 10828 elemStartPosition += (elemCurrentTop - elemTopOnPreviousStep + scrolledByOnPreviousStep); 10829 } 10830 scrollBy = elemStartPosition - additionalSpace;
10831 stickyElements.forEach(function(selector) { 10832 if (typeof selector === 'function') { 10833 scrollBy -= selector(); 10834 } else if (typeof selector === 'string') { 10835 document.querySelectorAll(selector).forEach(function(element) { 10836 scrollBy -= element.getBoundingClientRect().height; 10837 }); 10838 } else if (typeof selector === 'object' && typeof selector.getBoundingClientRect === 'function') { 10839 scrollBy -= selector.getBoundingClientRect().height; 10840 } 10841 }); 10842 elemTopOnPreviousStep = elemCurrentTop; 10843 } 10844 recalculateScrollCoords(); 10845 10846 const timeStart = Date.now(); 10847 const duration = 300; 10848 const frameStep = function() { 10849 const percentage = Math.min(((Date.now() - timeStart) / duration), 1); 10850 const step = 1 - ( 1 - percentage ) * ( 1 - percentage ); 10851 recalculateScrollCoords(); 10852 scrolledByOnPreviousStep = Math.round(scrollStart + scrollBy * step) - window.pageYOffset; 10853 window.scrollTo(0, Math.round(scrollStart + scrollBy * step)); 10854 if (percentage < 1) 10855 requestAnimationFrame(frameStep); 10856 } 10857 requestAnimationFrame(frameStep); 10858 } 10859 10860 var methods = { 10861 focus: function () { 10862 let element = $(this); 10863 $(this).on('animationend', _.once(function () { 10864 focusAction(element); 10865 })); 10866 }, 10867 selected: function () { 10868 focusAction($(this)); 10869 }, 10870 show: function () { 10871 this.each(function () { 10872 $(this).on('animationend', _.once(function () { 10873 $(this).removeClass(options.prefix + 'showing'); 10874 $(this).css('max-height', ''); 10875 })); 10876 $(this).css('max-height', $(this).data('height')); 10877 $(this).removeClass(options.prefix + 'hidden'); 10878 $(this).removeClass(options.prefix + 'sidebar-hidden'); 10879 $(this).addClass(options.prefix + 'showing'); 10880 }); 10881 }, 10882 hide: function () { 10883 this.each(function () { 10884 $(this).data('height', $(this).outerHeight()); 10885 $(this).css('max-height', $(this).outerHeight()); 10886 $(this).on('animationend', _.once(function () { 10887 $(this).removeClass(options.prefix + 'hiding'); 10888 $(this).addClass(options.prefix + 'hidden'); 10889 $(this).css('max-height', 0); 10890 })); 10891 $(this).addClass(options.prefix + 'hiding'); 10892 }); 10893 }, 10894 isHidden: function () { 10895 return this.hasClass(options.prefix + 'hidden') || this.hasClass(options.prefix + 'temporary'); 10896 }, 10897 isSidebarHidden: function() { 10898 return this.hasClass(options.prefix + 'sidebar-hidden'); 10899 }, 10900 }; 10901 10902 $.fn.listItem = function (method) { 10903 if (methods[method]) { 10904 return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); 10905 } else if (typeof method === 'object' || !method) { 10906 return methods.init.apply(this, arguments); 10907 } else { 10908 $.error('ÐеÑод Ñ Ð¸Ð¼ÐµÐ½ÐµÐ¼ ' + method + ' не опÑеделен Ð´Ð»Ñ jQuery.listItem'); 10909 } 10910 }; 10911})(jQuery);; 10912/* AUTOGENERATED: list_container.js */ 10913/* vim: set ts=2 sw=2 sts=2 et: */ 10914 10915/** 10916 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 10917 * See https://www.x-cart.com/license-agreement.html for license details. 10918 */ 10919 10920function ListContainer(element) { 10921 this.base = $(element); 10922 this.instances = []; 10923 10924 var self = this; 10925 var groups = $(this.base).find('.group-items.movable-group'); 10926 10927 $('.group-item').mouseenter(function () { 10928 if (!$(this).closest('.group-items').hasClass('group-items__on-move')) { 10929 $(this).removeClass('group-item__not-hoverable'); 10930 } 10931 }) 10932 10933 groups.each(function () { 10934 var instance = Sortable.create(this, { 10935 animation: 150, 10936 handle: '.themetweaker-panel-move', 10937 group: 'common', 10938 ghostClass: "sortable-ghost", // Class name for the drop placeholder 10939 chosenClass: "sortable-chosen", // Class name for the chosen item 10940 dragClass: "sortable-drag", 10941 onStart: _.bind(self.onStart, self), 10942 onEnd: _.bind(self.onEnd, self), 10943 onMove: _.bind(self.onMove, self), 10944 filter: ".group-item-hidden", 10945 }); 10946 10947 this.querySelectorAll('.themetweaker-panel-move').forEach((mover) => { 10948 mover.addEventListener("click", function(e) { 10949 e.stopPropagation(); 10950 }); 10951 }); 10952 10953 self.instances.push(instance); 10954 }); 10955} 10956 10957ListContainer.prototype.move = function (item) { 10958 var from = item.closest('.list-items-group'); 10959 var center = $('.list-items-group[data-list="center"]'); 10960 10961 if (center.length > 0) { 10962 center.append(item); 10963 var event = new Event('add'); 10964 event.from = from; 10965 event.to = center; 10966 event.item = item; 10967 this.onAdd(event); 10968 } else { 10969 console.error('Can\'t move item to center group, because it doesn\'t exist'); 10970 } 10971}; 10972 10973ListContainer.prototype.onStart = function (event) { 10974 xcart.trigger('layout.dragStart'); 10975 $('.group-item').addClass('group-item__not-hoverable'); 10976 $('.group-items').addClass('group-items__on-move'); 10977}; 10978 10979ListContainer.prototype.onEnd = function (event) { 10980 $('.group-items').removeClass('group-items__on-move'); 10981 xcart.trigger('layout.dragStop'); 10982}; 10983 10984ListContainer.prototype.onRemove = function (event) { 10985 10986}; 10987 10988 10989ListContainer.prototype.onFilter = function (event) { 10990 10991}; 10992 10993ListContainer.prototype.onMove = function (event) { 10994 xcart.trigger( 10995 'layout.listElemMoved', 10996 event 10997 ); 10998}; 10999 11000xcart.autoload(ListContainer, '.layout-editor-sidebar');; 11001/* AUTOGENERATED: main.js */ 11002/* vim: set ts=2 sw=2 sts=2 et: */ 11003 11004/** 11005 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 11006 * See https://www.x-cart.com/license-agreement.html for license details. 11007 */ 11008 11009$(function () { 11010 xcart.bind('cloud_search_facets_fetched', function (event, data) { 11011 const productsCountSelector = $('.product-block__label') 11012 if (productsCountSelector.length) { 11013 const message = productsCountSelector.text().replace(/\d+(?=\s|\b)/g, data.numFoundProducts); 11014 productsCountSelector.text(message) 11015 } 11016 }) 11017});; 11018/* AUTOGENERATED: popup.js */ 11019/* vim: set ts=2 sw=2 sts=2 et: */ 11020 11021/** 11022 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 11023 * See https://www.x-cart.com/license-agreement.html for license details. 11024 */ 11025 11026document.addEventListener('DOMContentLoaded', function () {
11027 (new MMYPopupManager()).run(); 11028}); 11029 11030function MMYPopupManager() { 11031 this.popupConditionData = xcart.getCommentedData(jQuery('body'), 'mmy_popup'); 11032} 11033 11034MMYPopupManager.prototype.run = function () { 11035 if (this.shouldOpenPopup()) { 11036 this.openPopup(); 11037 } 11038}; 11039 11040MMYPopupManager.prototype.shouldOpenPopup = function () { 11041 if (!this.popupConditionData) { 11042 return false; 11043 } 11044 11045 return this.popupConditionData.isEmptyAuto 11046 && this.popupConditionData.showSelectVehiclePopup 11047 && !this.popupConditionData.isClosePopupForever; 11048}; 11049 11050MMYPopupManager.prototype.openPopup = function () { 11051 popup.load(URLHandler.buildURL({ 11052 widget: 'QSL\\Make\\View\\SelectMMYSPopup\\SelectMMYSPopupWithReloadPage', 11053 target: 'add_vehicle', 11054 showCloseButton: true, 11055 showDoesntFitPopup: false, 11056 isListPage: false, 11057 source: 'category' 11058 })); 11059};; 11060/* AUTOGENERATED: updateCategoryResponseHash.js */ 11061/* vim: set ts=2 sw=2 sts=2 et: */ 11062 11063/** 11064 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 11065 * See https://www.x-cart.com/license-agreement.html for license details. 11066 */ 11067 11068(function () { 11069 if ( 11070 window.updateCsCategoryResponseHash 11071 && window.currentCategoryId > 0 11072 ) { 11073 navigator.sendBeacon( 11074 URLHandler.buildURL({ 11075 'target': 'cs_category_response_hash', 11076 'category_id': window.currentCategoryId 11077 }) 11078 ); 11079 } 11080})();; 11081/* AUTOGENERATED: filters_store.js */ 11082/* vim: set ts=2 sw=2 sts=2 et: */ 11083 11084/** 11085 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 11086 * See https://www.x-cart.com/license-agreement.html for license details. 11087 */ 11088 11089define('cs_filters/store', ['vue/vuex', 'js/underscore'], function (Vuex, _) { 11090 return new Vuex.Store({ 11091 state: { 11092 filtersSelectedValues: [] 11093 }, 11094 mutations: { 11095 setFiltersValues: function (state, filters) { 11096 state.filtersSelectedValues = filters 11097 }, 11098 removeEntireFilter: function (state, filterId) { 11099 state.filtersSelectedValues = state.filtersSelectedValues.filter(item => item.filterId !== filterId); 11100 }, 11101 removeFilter: function (state, { filterId, value }) { 11102 state.filtersSelectedValues = state.filtersSelectedValues.filter(item => { 11103 if (item.filterId !== filterId) { 11104 return true; 11105 } 11106 if (Array.isArray(value)) { 11107 return false; 11108 } 11109 if (Array.isArray(item.value)) { 11110 const existedValue = item.value.filter(v => v === value); 11111 if (existedValue.length > 0) { 11112 return false; 11113 } 11114 } 11115 return true 11116 }); 11117 } 11118 }, 11119 actions: { 11120 updateFiltersValues: function (context, filters) { 11121 context.commit('setFiltersValues', filters) 11122 }, 11123 removeEntireFilter: function (context, filterId) { 11124 context.commit('removeEntireFilter', filterId); 11125 }, 11126 removeFilterValue: function (context, payload) { 11127 context.commit('removeFilter', payload); 11128 } 11129 } 11130 }) 11131});; 11132/* AUTOGENERATED: filters_values_list_comp.js */ 11133/* vim: set ts=2 sw=2 sts=2 et: */ 11134 11135/** 11136 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 11137 * See https://www.x-cart.com/license-agreement.html for license details. 11138 */ 11139 11140define('cs_filters/filters-values-list-comp', ['vue/vue', 'vue/vuex', 'js/underscore'], function (Vue, Vuex, _) { 11141 return Vue.extend({ 11142 template: '#cloud-filters-values-list-box', 11143 data() { 11144 return { 11145 activePopoverIndex: null, 11146 touchStartY: 0, 11147 touchMoveY: 0, 11148 originalTitle: null 11149 } 11150 }, 11151 computed: { 11152 filtersSelectedValues: function () { 11153 xcart.trigger('cloud-filters-values-list-box.changed') 11154 return this.$store.state.filtersSelectedValues 11155 }, 11156 isExistFiltersSelectedValues: function () { 11157 return !_.isEmpty(this.$store.state.filtersSelectedValues) 11158 }, 11159 groupedFilterValues: function () { 11160 let groupedValues = {}; 11161 let order = []; 11162 11163 this.filtersSelectedValues.forEach((item, originalIndex) => { 11164 if (!groupedValues[item.filterId]) { 11165 groupedValues[item.filterId] = { 11166 name: item.name, 11167 filterId: item.filterId, 11168 value: [], 11169 visibleValue: [], 11170 indexes: {} 11171 }; 11172 order.push(item.filterId); 11173 } 11174 if (Array.isArray(item.value)) { 11175 item.value.forEach((val, i) => { 11176 groupedValues[item.filterId].indexes[groupedValues[item.filterId].value.length] = originalIndex; 11177 groupedValues[item.filterId].value.push(val); 11178 groupedValues[item.filterId].visibleValue.push(item.visibleValue[i]); 11179 }); 11180 } else { 11181 groupedValues[item.filterId].value = item.value; 11182 groupedValues[item.filterId].visibleValue = item.visibleValue; 11183 } 11184 }); 11185 11186 return order.map(id => groupedValues[id]); 11187 } 11188 }, 11189 methods: _.extend( 11190 Vuex.mapActions([ 11191 'updateFiltersValues', 11192 'removeFilterValue', 11193 'removeEntireFilter' 11194 ]), { 11195 clearFilters: function () { 11196 this.updateFiltersValues([]) 11197 }, 11198 removeValue: function(groupIndex, valueIndex, event) { 11199 if (event) { 11200 event.stopPropagation(); 11201 } 11202 11203 const filterValue = this.groupedFilterValues[groupIndex]; 11204 if (!filterValue) return; 11205 11206 if (this.isPrice(filterValue)) { 11207 this.removeFilterValue({ 11208 filterId: 'price', 11209 value: filterValue.value 11210 }); 11211 return; 11212 } 11213 11214 if (this.isSingleFilterGroupedValue(filterValue)) { 11215 this.removeFilterValue({ 11216 filterId: filterValue.filterId, 11217 value: filterValue.value[0] 11218 }); 11219 return; 11220 } 11221 11222 if (valueIndex !== undefined) { 11223 const lengthForClosingPopover = 2; 11224 if (filterValue.value.length === lengthForClosingPopover) { 11225 this.closePopovers(); 11226 } 11227 11228 this.removeFilterValue({ 11229 filterId: filterValue.filterId, 11230 value: filterValue.value[valueIndex] 11231 }); 11232 } 11233 }, 11234 removeEntireFilterByIndex: function(groupIndex) { 11235 const filterValue = this.groupedFilterValues[groupIndex]; 11236 if (filterValue) { 11237 this.closePopovers(); 11238 this.removeEntireFilter(filterValue.filterId); 11239 } 11240 }, 11241 isSingleFilterGroupedValue: function (filterValue) { 11242 return filterValue.value.length === 1 11243 }, 11244 isPrice: function (filterValue) { 11245 return filterValue.filterId === 'price' 11246 }, 11247 isMinPrice: function(filterValue) { 11248 return _.has(filterValue.visibleValue, 'min_price'); 11249 }, 11250 isMaxPrice: function(filterValue) { 11251 return _.has(filterValue.visibleValue, 'max_price'); 11252 }, 11253 getMinPrice: function (filterValue) { 11254 if (this.isMinPrice(filterValue)) { 11255 return filterValue.visibleValue.min_price; 11256 } 11257 11258 return 0 11259 }, 11260 getMaxPrice: function (filterValue) { 11261 if (this.isMaxPrice(filterValue)) { 11262 return filterValue.visibleValue.max_price; 11263 } 11264 11265 return 0 11266 }, 11267 filterTagId: function (filterValue) { 11268 if (filterValue.filterId === 'price') { 11269 return 'price' 11270 } else { 11271 return window.xcart.utils.hash(filterValue.filterId + filterValue.visibleValue.toString()); 11272 } 11273 }, 11274 togglePopover(index) { 11275 if (this.activePopoverIndex === index) { 11276 this.closePopovers(); 11277 } else { 11278 this.activePopoverIndex = index; 11279 this.updateNavbarTitleToBack(); 11280 this.setPopoverHeight() 11281 } 11282 }, 11283 isAutomobileSkin() { 11284 return $('html').is('[data-theme]'); 11285 }, 11286 toggleMobileNavbarOverflow (isOpened) { 11287 if (this.isDesktop() || this.isAutomobileSkin()) { 11288 return 11289 } 11290 11291 $('#cloud-filters-mobile') 11292 .children() 11293 .each(function () { 11294 const $el = $(this) 11295 if ( 11296 $el.hasClass('cloud-filters-selected-values-mobile') || 11297 $el.hasClass('mm-navbar') 11298 ) { 11299 return 11300 } 11301 11302 if (isOpened) { 11303 $el.addClass('filter-hidden'); 11304 } else { 11305 $el.removeClass('filter-hidden') 11306 } 11307 }) 11308 }, 11309 setPopoverHeight() { 11310 if (!this.isDesktop() && this.isAutomobileSkin()) { 11311 this.$nextTick(() => { 11312 const popover = this.$el.querySelector('.filters-popover'); 11313 if (popover) { 11314 const contentHeight = popover.scrollHeight + 2; 11315 popover.style.height = `${contentHeight}px`; 11316 } 11317 }); 11318 } 11319 }, 11320 resetPopoverHeightIfDesktop() { 11321 if (this.isDesktop()) { 11322 const popover = this.$el.querySelector('.filters-popover'); 11323 if (popover) { 11324 popover.style.height = 'auto'; 11325 } 11326 } 11327 }, 11328 closePopovers(event) { 11329 if (!event || !this.$el.querySelector('.filters-popover')?.contains(event.target)) { 11330 this.activePopoverIndex = null; 11331 this.restoreNavbarTitle(); 11332 } 11333 }, 11334 handleClickOutside(event) { 11335 if (!this.$el.contains(event.target) || 11336 !event.target.closest('.filters-popover')) { 11337 this.closePopovers(); 11338 } 11339 }, 11340 isDesktop() { 11341 return window.innerWidth > 768; 11342 }, 11343 onTouchStart(e) { 11344 if (this.isDesktop()) { 11345 return; 11346 } 11347 this.touchStartY = e.touches[0].clientY; 11348 }, 11349 onTouchMove(e) { 11350 if (this.isDesktop()) { 11351 return; 11352 } 11353 this.touchMoveY = e.touches[0].clientY; 11354 }, 11355 onTouchEnd(e) { 11356 if (this.isDesktop()) return; 11357 11358 const popoverEl = this.$el.querySelector('.filters-popover');
11359 if (!popoverEl) return; 11360 11361 const contentEl = popoverEl.querySelector('.filters-popover__content'); 11362 const headerEl = popoverEl.querySelector('.filters-drawer__header'); 11363 const swipeDistance = this.touchMoveY - this.touchStartY; 11364 11365 if (swipeDistance < 50) { 11366 return; 11367 } 11368 11369 const touch = e.changedTouches[0]; 11370 const headerRect = headerEl.getBoundingClientRect(); 11371 const contentRect = contentEl.getBoundingClientRect(); 11372 11373 const isTouchInHeader = ( 11374 touch.clientY >= headerRect.top && 11375 touch.clientY >= headerRect.bottom 11376 ); 11377 11378 const isTouchInContent = ( 11379 touch.clientY >= contentRect.top && 11380 touch.clientY <= contentRect.bottom 11381 ); 11382 11383 if (contentEl.scrollTop <= 0 && isTouchInContent && !(contentEl.scrollWidth > contentEl.clientWidth)) { 11384 this.togglePopover(this.activePopoverIndex); 11385 return; 11386 } 11387 11388 if (isTouchInHeader && (touch.target.className === 'filters-drawer' || $(touch.target).find('.filters-drawer').length > 0)) { 11389 this.togglePopover(this.activePopoverIndex); 11390 } 11391 }, 11392 updateNavbarTitleToBack() { 11393 const navbar = $('.mm-navbar-top:visible'); 11394 11395 if (navbar.length === 0) return; 11396 11397 const title = navbar.find('.mm-title'); 11398 11399 if (title.length === 0) return; 11400 11401 if (this.originalTitle === null) { 11402 this.originalTitle = title.text(); 11403 } 11404 11405 const backTitle = xcart.t('[csf] Back') 11406 11407 title.html(`<a href="javascript:void(0)" class="filters-mm-back-link">${backTitle}</a>`); 11408 11409 title.find('.mm-back-link').on('click', (e) => { 11410 e.preventDefault(); 11411 this.closePopovers(); 11412 }); 11413 }, 11414 restoreNavbarTitle() { 11415 const navbar = $('.mm-navbar-top:visible'); 11416 if (!navbar || this.originalTitle === null) return; 11417 11418 const title = navbar.find('.mm-title'); 11419 if (title) { 11420 title.html(this.originalTitle); 11421 } 11422 11423 this.originalTitle = null; 11424 } 11425 }), 11426 watch: { 11427 activePopoverIndex(newValue, oldValue) { 11428 this.toggleMobileNavbarOverflow(newValue !== null); 11429 } 11430 }, 11431 mounted() { 11432 document.addEventListener('click', this.handleClickOutside); 11433 window.addEventListener('touchstart', this.onTouchStart, { passive: true }); 11434 window.addEventListener('touchmove', this.onTouchMove, { passive: true }); 11435 window.addEventListener('touchend', this.onTouchEnd, { passive: true }); 11436 window.addEventListener('resize', this.resetPopoverHeightIfDesktop); 11437 }, 11438 beforeDestroy() { 11439 document.removeEventListener('click', this.handleClickOutside); 11440 window.removeEventListener('touchstart', this.onTouchStart); 11441 window.removeEventListener('touchmove', this.onTouchMove); 11442 window.removeEventListener('touchend', this.onTouchEnd); 11443 window.removeEventListener('resize', this.resetPopoverHeightIfDesktop); 11444 } 11445 }) 11446});; 11447/* AUTOGENERATED: filters_values_list_box.js */ 11448/* vim: set ts=2 sw=2 sts=2 et: */ 11449 11450/** 11451 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 11452 * See https://www.x-cart.com/license-agreement.html for license details. 11453 */ 11454 11455define('cs_filters/filters-selected-values-list-box', ['vue/vue', 'cs_filters/store', 'cs_filters/filters-values-list-comp', 'js/underscore'], function (Vue, Store, FiltersValuesListBox, _) { 11456 const CommonFiltersValuesListBox = Vue.extend({ 11457 store: Store, 11458 components: { 11459 'cloud-filters-values-list-box': FiltersValuesListBox 11460 } 11461 }) 11462 11463 return new CommonFiltersValuesListBox({el: '#cloud-filters-selected-values'}) 11464});; 11465/* AUTOGENERATED: controller.js */ 11466/* vim: set ts=2 sw=2 sts=2 et: */ 11467 11468/** 11469 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 11470 * See https://www.x-cart.com/license-agreement.html for license details. 11471 */ 11472 11473function FitmentSetInfo(base) 11474{ 11475 this.base = base 11476 11477 //got fitment id from backend 11478 //if no id (when reset all filters, unchoose CS-filter contained in fitment) - hide fitment chip (show CS-chips contained in fitment) 11479 //if id not null, nothing to do, because we show fitment chip on checkbox click 11480 xcart.bind('wts.fitment.received', _.bind(this.hideFitmentChipByFitmentReceived, this)) 11481 11482 //choose some fitment - receive selectedFitmentData: set chipIdsContainedInFitment, show fitment chip (hide CS-chips contained in fitment) 11483 xcart.bind('wts.oe.fitment.selector.changed', _.bind(this.reload, this)) 11484 11485 //changed CS chips list: choose fitment in WheelTireFitment-filters (set chipIdsContainedInFitment), 11486 //then changed cs chips list (this event, after changed cs-filters checkboxes), 11487 //then hide chips contained in fitment 11488 xcart.bind('cloud-filters-values-list-box.changed', _.bind(this.hideChipsContainedInFitment, this)) 11489 11490 //unchoose fitment in WheelTireFitment-filters, unset chipIdsContainedInFitment and hide fitment chip (show CS-chips contained in fitment) 11491 this.base.querySelector('.wts-close-icon')?.addEventListener('click', _.bind(this.onClearClick, this)) 11492 11493 //if selected fitment exist in session:
11494 //set chipIdsContainedInFitment (got from backend in xcart commented data) 11495 //show fitment chip (hide CS-chips contained in fitment) 11496 this.hideChipsContainedInFitmentForFirstLoad() 11497} 11498 11499FitmentSetInfo.prototype.base = null 11500 11501//current list of CS-chips ids contained in fitment (to show/hide) 11502FitmentSetInfo.prototype.chipIdsContainedInFitment = [] 11503 11504FitmentSetInfo.prototype.pattern = '.block-fitment-set-info' 11505 11506FitmentSetInfo.prototype.infoBlockClass = '.vehicle-attribute-info' 11507 11508FitmentSetInfo.prototype.infoBlockIdClass = '.vehicle-attribute-info-id-' 11509 11510FitmentSetInfo.prototype.frontBlockClass = '.vehicle-attribute-info-front' 11511 11512FitmentSetInfo.prototype.rearBlockClass = '.vehicle-attribute-info-rear' 11513 11514FitmentSetInfo.prototype.nameBlockClass = '.filters-values-chip__name-value' 11515 11516FitmentSetInfo.prototype.selectedFiltersValuesBlockClass = '.cloud-filters-values-box' 11517 11518FitmentSetInfo.prototype.chipClass = '.filters-values-chip' 11519 11520FitmentSetInfo.prototype.clearAllChipsLink = '.cloud-filters-values-box__clear-link' 11521 11522FitmentSetInfo.prototype.onClearClick = function () { 11523 this.hideFitmentChip() 11524 xcart.trigger('wts.clear.oe.fitment.clicked') 11525} 11526 11527FitmentSetInfo.prototype.hideChipsContainedInFitmentForFirstLoad = function() 11528{ 11529 this.setChipIdsContainedInFitment(this.getChipIdsContainedInFitmentFromCommentedData()) 11530 this.hideChipsContainedInFitment() 11531} 11532 11533FitmentSetInfo.prototype.getChipIdsContainedInFitmentFromCommentedData = function () { 11534 const base = this.base 11535 const filter_values = xcart.getCommentedData(base.querySelector('.content'), 'filter_values'); 11536 const chipIdsContainedInFitment = _.map(filter_values, function (value) { 11537 return window.xcart.utils.hash(value[0] + value[1]) 11538 }) 11539 11540 return chipIdsContainedInFitment 11541} 11542 11543FitmentSetInfo.prototype.reload = function (event, selectedData) { 11544 const id = _.get(selectedData, 'id', 0) 11545 this.setChipIdsContainedInFitment(this.getChipIdsContainedInFitmentByFilterData(selectedData)) 11546 this.updateFitmentChip(id) 11547} 11548 11549FitmentSetInfo.prototype.updateFitmentChip = function(infoBlockId) { 11550 let infoBlock = null 11551 let frontBlock = null 11552 let rearBlock = null 11553 11554 if (infoBlockId) { 11555 infoBlock = document.querySelector(this.infoBlockIdClass + infoBlockId) 11556 frontBlock = infoBlock?.querySelector(this.frontBlockClass) 11557 rearBlock = infoBlock?.querySelector(this.rearBlockClass) 11558 } 11559 11560 this.replaceName(infoBlock) 11561 this.replaceBlock(frontBlock, this.frontBlockClass) 11562 this.replaceBlock(rearBlock, this.rearBlockClass) 11563 11564 this.hideChipsContainedInFitment() 11565} 11566 11567FitmentSetInfo.prototype.replaceName = function(infoBlock) { 11568 const parent = this.base.querySelector(this.infoBlockClass) 11569 let name = infoBlock?.parentNode.querySelector('input[type="radio"]')?.getAttribute('data-filter-label') 11570 11571 if (!name) { 11572 name = '' 11573 } 11574 11575 parent.querySelector(this.nameBlockClass).innerHTML = name 11576} 11577 11578FitmentSetInfo.prototype.replaceBlock = function(block, blockClass) { 11579 const parent = this.base.querySelector(this.infoBlockClass) 11580 const oldBlock = parent?.querySelector(blockClass) 11581 const newBlock = block?.cloneNode(true) 11582 11583 oldBlock?.remove() 11584 if (newBlock) { 11585 parent?.appendChild(newBlock) 11586 } 11587} 11588 11589FitmentSetInfo.prototype.hideFitmentChipByFitmentReceived = function (event, data) { 11590 const id = _.get(data, 'id', null) 11591 if (!id) { 11592 this.hideFitmentChip() 11593 } 11594} 11595 11596FitmentSetInfo.prototype.hideFitmentChip = function() { 11597 this.setChipIdsContainedInFitment([]) 11598 this.updateFitmentChip(null) 11599} 11600 11601FitmentSetInfo.prototype.getChipIdsContainedInFitmentByFilterData = function (selectedData) { 11602 if (!_.has(selectedData, 'filterValues')) { 11603 return 11604 } 11605 11606 const chipIdsContainedInFitment = []; 11607 _.each(selectedData.filterValues, function (values, name) { 11608 if (!_.isArray(values)) { 11609 values = [values] 11610 } 11611 _.each(values, function(value, ind) { 11612 chipIdsContainedInFitment.push(window.xcart.utils.hash(name + value)) 11613 }) 11614 }) 11615 11616 return chipIdsContainedInFitment 11617} 11618 11619FitmentSetInfo.prototype.setChipIdsContainedInFitment = function(chipIdsContainedInFitment) { 11620 this.chipIdsContainedInFitment = chipIdsContainedInFitment 11621} 11622 11623FitmentSetInfo.prototype.hideChipsContainedInFitment = function() 11624{ 11625 const chipIdsContainedInFitment = this.chipIdsContainedInFitment
11626 const parent = this.base.closest(this.selectedFiltersValuesBlockClass) 11627 parent.querySelectorAll(this.chipClass).forEach(function (chip) { 11628 if (_.contains(chipIdsContainedInFitment, chip.id)) { 11629 chip.classList.add('hidden') 11630 } else { 11631 chip.classList.remove('hidden') 11632 } 11633 }) 11634 11635 this.showHideClearAllChipsLink() 11636} 11637 11638FitmentSetInfo.prototype.showHideClearAllChipsLink = function () 11639{ 11640 const parent = this.base.closest(this.selectedFiltersValuesBlockClass) 11641 11642 if (_.isEmpty(parent.querySelectorAll(this.nameBlockClass + ':not(:empty)'))) { 11643 parent.querySelector(this.clearAllChipsLink).style.display = 'none' 11644 } else { 11645 parent.querySelector(this.clearAllChipsLink).style.display = '' 11646 } 11647} 11648 11649xcart.microhandlers.add( 11650 'FitmentSetInfo', 11651 FitmentSetInfo.prototype.pattern, 11652 function(event) { 11653 this.dataset.controller = new FitmentSetInfo(this) 11654 } 11655) 11656 11657jQuery(document).ready(function () { 11658 const interval = setInterval(function () { 11659 if (jQuery('#cloud-filters-mobile .cloud-filters-filter ul input[type=checkbox]').length > 0) { 11660 xcart.microhandlers.run('FitmentSetInfo', '#cloud-filters-mobile') 11661 clearInterval(interval) 11662 } 11663 }, 100) 11664});; 11665/* AUTOGENERATED: items_list.js */ 11666/* vim: set ts=2 sw=2 sts=2 et: */ 11667 11668/** 11669 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 11670 * See https://www.x-cart.com/license-agreement.html for license details. 11671 */ 11672 11673// Main class 11674function ListsController(base) 11675{ 11676 ListsController.superclass.constructor.apply(this, arguments); 11677 11678 if (this.base && this.base.length) { 11679 this.block = this.getListView(); 11680 } 11681} 11682 11683extend(ListsController, AController); 11684 11685ListsController.prototype.name = 'ItemsListController'; 11686 11687ListsController.prototype.findPattern = '.items-list'; 11688 11689ListsController.prototype.block = null; 11690 11691ListsController.prototype.selfUpdated = false; 11692 11693ListsController.prototype.getListView = function() 11694{ 11695 return new ListView(this.base); 11696}; 11697 11698// Initialize controller 11699ListsController.prototype.initialize = function() 11700{ 11701 var o = this; 11702 11703 this.base.bind( 11704 'reload', 11705 function(event, box) { 11706 o.bind(box); 11707 } 11708 ); 11709}; 11710 11711/** 11712 * Main widget (listView) 11713 */ 11714 11715function ListView(base) 11716{ 11717 this.widgetClass = xcart.getCommentedData(base, 'widget_class'); 11718 this.widgetTarget = xcart.getCommentedData(base, 'widget_target'); 11719 this.widgetParams = xcart.getCommentedData(base, 'widget_params'); 11720 this.replaceState = xcart.getCommentedData(base, 'replaceState'); 11721 this.replaceStatePrefix = xcart.getCommentedData(base, 'replaceStatePrefix'); 11722 this.listenToGetParams = xcart.getCommentedData(base, 'listenToGetParams'); 11723 11724 ListView.superclass.constructor.apply(this, arguments); 11725} 11726 11727extend(ListView, ALoadable); 11728 11729ListView.prototype.getCurrentPageIdParam = function() { 11730 const url = new URL(window.location); 11731 const urlParams = url.searchParams; 11732 11733 return urlParams.has('pageId') 11734 ? { 'pageId': parseInt(urlParams.get('pageId'), 10) } 11735 : {}; 11736}; 11737 11738ListView.prototype.load = function(params) 11739{ 11740 if (this.replaceState) { 11741 this.doReplaceState(params); 11742 } 11743 11744 if (this.listenToGetParams) { 11745 const url = new URL(window.location); 11746 const urlParams = url.searchParams; 11747 11748 _.mapObject(params, (value, key) => { 11749 if (key === 'pageId') { 11750 urlParams.set(key, value); 11751 } 11752 11753 if (key !== 'pageId' && key !== 'displayMode') { 11754 urlParams.delete('pageId'); 11755 } 11756 }); 11757 11758 11759 url.searchParams = urlParams.toString(); 11760 11761 history.pushState({}, null, url.toString()); 11762 } 11763 11764 if (!xcart.isRequesterEnabled) { 11765 return false; 11766 } 11767 11768 if (this.isLoading) { 11769 this.deferredLoad = true; 11770 return true; 11771 } 11772 11773 this.isLoading = true; 11774 this.deferredLoad = false; 11775 11776 this.lastLoadParams = params; 11777 11778 const newUrl = this.buildWidgetRequestURL(params); 11779 11780 if (this.base) { 11781 this.base.trigger('preload', [this, newUrl]); 11782 11783 if (typeof(this.preloadHandler) == 'function') { 11784 // Call preload event handler 11785 this.preloadHandler.call(this.base); 11786 } 11787 } 11788 11789 var state = { 'widget': this, 'url': newUrl, 'options': this.getLoaderOptions() } 11790 11791 this.triggerVent('preload', state); 11792 11793 this.saveState(); 11794 11795 this.shade(); 11796 11797 state.xhr = xcart.get(state.url, this.loadHandlerCallback, null, state.options); 11798 11799 this.triggerVent('afterload', state); 11800 11801 return state.xhr; 11802}; 11803 11804 11805ListView.prototype.shadeWidget = true; 11806 11807ListView.prototype.sessionCell = null; 11808 11809ListView.prototype.postprocess = function(isSuccess, initial) 11810{ 11811 ListView.superclass.postprocess.apply(this, arguments); 11812 11813 if (isSuccess) { 11814 11815 const o = this; 11816 11817 // Register page click handler 11818 jQuery('.pagination a', this.base).click( 11819 function() { 11820 // scroll page to list top 11821 jQuery('html, body').animate({scrollTop: o.base.offset().top}); 11822 11823 return !o.load({'pageId': xcart.getValueFromClass(this, 'page')}); 11824 } 11825 ); 11826 jQuery('input.page-length').validationEngine(); 11827 11828 // Register page count change handler 11829 jQuery('input.page-length', this.base).change( 11830 function() { 11831 if (!o.isLoading) {
11832 if(!jQuery(this).validationEngine('validate')) { 11833 count = parseInt(jQuery(this).val()); 11834 11835 if (isNaN(count)) { 11836 //TODO We must take it from the previous widget parameters ... 11837 count = 10; 11838 11839 } else if (count < 1) { 11840 count = 1; 11841 } 11842 11843 if (count != jQuery(this).val()) { 11844 jQuery(this).val(count); 11845 } 11846 11847 o.load({ 11848 'pageId': 1, 11849 'itemsPerPage': count 11850 }); 11851 } 11852 } 11853 } 11854 ); 11855 11856 jQuery('input.page-length', this.base).keypress( 11857 function(event) { 11858 if (event.keyCode == 13) { 11859 jQuery(event.currentTarget).change(); 11860 } 11861 } 11862 ); 11863 11864 window.addEventListener('popstate', function () { 11865 if (xcart.getCommentedData(o.base, 'listenToGetParams')) { 11866 location.reload(); 11867 } 11868 }); 11869 } 11870};; 11871/* AUTOGENERATED: products_list.js */ 11872/* vim: set ts=2 sw=2 sts=2 et: */ 11873 11874/** 11875 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 11876 * See https://www.x-cart.com/license-agreement.html for license details. 11877 */ 11878 11879function ProductsListView(base) 11880{ 11881 ProductsListView.superclass.constructor.apply(this, arguments); 11882 11883 xcart.bind('popup.close', _.bind(this.handleCloseQuickLookPopup, this)); 11884 11885 this.requests = []; 11886} 11887 11888extend(ProductsListView, ListView); 11889 11890// Products list class 11891function ProductsListController(base) 11892{ 11893 ProductsListController.superclass.constructor.apply(this, arguments); 11894 11895 xcart.bind('updateCart', _.bind(this.updateCartHandler, this)); 11896} 11897 11898extend(ProductsListController, ListsController); 11899 11900ProductsListController.prototype.name = 'ProductsListController'; 11901 11902ProductsListController.prototype.findPattern += '.items-list-products'; 11903 11904ProductsListController.prototype.getListView = function() 11905{ 11906 return new ProductsListView(this.base); 11907}; 11908 11909ProductsListController.prototype.updateCartHandler = function(event, data) { 11910 if (_.isUndefined(data.items)) { 11911 return; 11912 } 11913 11914 for (let i = 0; i < data.items.length; i++) { 11915 if (data.items[i].object_type == 'product') { 11916 11917 // Added mark 11918 const productPattern = '.product.productid-' + data.items[i].object_id; 11919 const product = jQuery(productPattern, this.base); 11920 const oldQty = product.find('.qty-in-cart').val(); 11921 11922 if ( 11923 !oldQty 11924 || !data.items[i].quantity_change 11925 || !product.hasClass('qty-update-is-needed') 11926 ) { 11927 return; 11928 } 11929 11930 const newQty = parseInt(oldQty) + data.items[i].quantity_change; 11931 11932 if (newQty > 0) { 11933 product.addClass('product-added'); 11934 if (this.block) { 11935 this.block.triggerVent('item.addedToCart', {'view': this, 'item': product}); 11936 } 11937 11938 } else { 11939 product.removeClass('product-added'); 11940 if (this.block) { 11941 this.block.triggerVent('item.removedFromCart', {'view': this, 'item': product}); 11942 } 11943 } 11944 11945 if (product.hasClass('qty-update-is-needed')) { 11946 product 11947 .find('.qty-in-cart') 11948 .val(newQty); 11949 11950 product.removeClass('qty-update-is-needed'); 11951 } 11952 11953 // Check inventory limit 11954 if (data.items[i].is_limit) { 11955 product.addClass('out-of-stock'); 11956 11957 product 11958 .find('.increase-qty') 11959 .prop('disabled', true); 11960 11961 product 11962 .find('.add-to-cart') 11963 .prop('disabled', true); 11964 11965 if (this.block) { 11966 this.block.triggerVent('item.outOfStock', {'view': this, 'item': product}); 11967 } 11968 11969 } else { 11970 product.removeClass('out-of-stock all-stock-in-cart') 11971 11972 product 11973 .find('.increase-qty') 11974 .prop('disabled', false); 11975 11976 product 11977 .find('.add-to-cart') 11978 .prop('disabled', false); 11979 11980 if (this.block) { 11981 this.block.triggerVent('item.stockIncrease', {'view': this, 'item': product}); 11982 } 11983 } 11984 } 11985 } 11986}; 11987 11988ProductsListView.prototype.postprocess = function(isSuccess, initial) 11989{ 11990 ProductsListView.superclass.postprocess.apply(this, arguments); 11991 11992 const self = this; 11993 11994 if (isSuccess) { 11995 11996 // Column switcher for 'table' display mode 11997 jQuery('.products-table .column-switcher', this.base).commonController('markAsColumnSwitcher'); 11998 11999 const currentPageIdParam = self.getCurrentPageIdParam(); 12000 12001 // Register "Changing display mode" handler 12002 jQuery('.display-modes a', this.base).click( 12003 function() { 12004 return !self.load({ 12005 ...currentPageIdParam, 12006 'displayMode': jQuery(this).attr('class') 12007 }); 12008 } 12009 ); 12010 12011 // Register "Sort by" selector handler 12012 jQuery('.sort-crit a', this.base).click( 12013 function () { 12014 return !self.load({ 12015 'pageId': 1, 12016 'sortBy': jQuery(this).data('sort-by'), 12017 'sortOrder': jQuery(this).data('sort-order'), 12018 'mode': 'append' 12019 }); 12020 } 12021 ); 12022 12023 xcart.bind( 12024 'afterPopupPlace', 12025 function() { 12026 new ProductDetailsController(jQuery('.ui-dialog div.product-quicklook')); 12027 } 12028 ); 12029 12030 // Manual set cell's height 12031 this.base.find('table.products-grid tr').each( 12032 function () { 12033 let height = 0; 12034 jQuery('div.product', this).each( 12035 function() { 12036 height = Math.max(height, jQuery(this).height()); 12037 } 12038 ); 12039 } 12040 ); 12041 12042 // Process click on 'Add to cart' buttons by AJAX 12043 jQuery('.add-to-cart, .increase-qty', this.base).not('.link').each( 12044 function (index, elem) { 12045 jQuery(elem).click(function() { 12046 12047 let product = $(elem).closest('.product-cell').find('.product'); 12048 if (!product.length) { 12049 product = $(elem).closest('.product-cell'); 12050 } 12051 12052 const pid = xcart.getValueFromClass(product, 'productid'); 12053 const forceOptions = product.is('.need-choose-options'); 12054 const changeQuantityButtons = self.getChangeQuantityButtons(product); 12055 12056 if (pid && !self.isLoading) { 12057 changeQuantityButtons.forEach((button) => { 12058 button.element.prop('disabled', true); 12059 }); 12060 } 12061
12062 product.addClass('qty-update-is-needed'); 12063 12064 if (forceOptions) { 12065 changeQuantityButtons.forEach((button) => { 12066 button.element.prop('disabled', button.disabledState); 12067 }); 12068 self.openQuickLook(product); 12069 } else { 12070 xcart.trigger('addToCartViaClick', {productId: pid}); 12071 12072 self.addToCart(elem) 12073 .always(function() { 12074 changeQuantityButtons.forEach((button) => { 12075 button.element.prop('disabled', button.disabledState); 12076 }); 12077 }); 12078 } 12079 }); 12080 } 12081 ); 12082 12083 // Process click on 'Decrease quantity' button by AJAX 12084 jQuery('.decrease-qty', this.base).each( 12085 function (index, elem) { 12086 jQuery(elem).click(function() { 12087 let product = $(elem).closest('.product-cell').find('.product'); 12088 if (!product.length) { 12089 product = $(elem).closest('.product-cell'); 12090 } 12091 12092 const pid = xcart.getValueFromClass(product, 'productid'); 12093 const changeQuantityButtons = self.getChangeQuantityButtons(product); 12094 12095 if (pid && !self.isLoading) { 12096 changeQuantityButtons.forEach((button) => { 12097 button.element.prop('disabled', true); 12098 }); 12099 } 12100 12101 product.addClass('qty-update-is-needed'); 12102 12103 xcart.trigger('removeFromCartViaClick', {productId: pid}); 12104 12105 self.removeFromCart(elem) 12106 .always(function() { 12107 changeQuantityButtons.forEach((button) => { 12108 button.element.prop('disabled', button.disabledState); 12109 }); 12110 }); 12111 }); 12112 } 12113 ); 12114 } // if (isSuccess) 12115}; // ProductsListView.prototype.postprocess() 12116 12117 12118ProductsListView.prototype.productPattern = '.products-grid .product, .products-list .product, .products-sidebar .product'; 12119 12120 12121// Post AJAX request to add product to cart 12122ProductsListView.prototype.addToCart = function (elem) { 12123 const $elem = jQuery(elem); 12124 const pid = xcart.getValueFromClass($elem, 'productid'); 12125 12126 let xhr = new $.Deferred(); 12127 12128 if (pid && !this.isLoading) { 12129 if (this) { 12130 xhr = xcart.post( 12131 URLHandler.buildURL({ target: 'cart', action: 'add' }), 12132 _.bind(this.handleAddToCart, this),
12133 this.addToCartRequestParams($elem), 12134 { 12135 rpc: true 12136 } 12137 ); 12138 } 12139 } else { 12140 xhr.reject(); 12141 } 12142 12143 return xhr; 12144}; 12145 12146ProductsListView.prototype.addToCartRequestParams = function ($elem) { 12147 const pid = xcart.getValueFromClass($elem, 'productid'); 12148 const isProductAdded = ($elem.closest('.product-added').length > 0); 12149 12150 return { 12151 target: 'cart', 12152 action: 'add', 12153 product_id: pid, 12154 addLastUpdatedItem: isProductAdded 12155 } 12156} 12157 12158ProductsListView.prototype.handleAddToCart = function (XMLHttpRequest, textStatus, data, isValid) { 12159 if (!isValid) { 12160 xcart.trigger( 12161 'message', 12162 { 12163 text: 'An error occurred during adding the product to cart. Please refresh the page and try to add the product to cart again or contact the store administrator.', 12164 type: 'error' 12165 } 12166 ); 12167 } 12168}; 12169 12170// Post AJAX request to remove product from cart 12171ProductsListView.prototype.removeFromCart = function (elem) { 12172 const $elem = jQuery(elem); 12173 const pid = xcart.getValueFromClass($elem, 'productid'); 12174 12175 let xhr = new $.Deferred(); 12176 12177 if (pid && !this.isLoading) { 12178 if (this) { 12179 xhr = xcart.post( 12180 URLHandler.buildURL({ target: 'cart', action: 'remove' }), 12181 _.bind(this.handleRemoveFromCart, this),
12182 this.removeFormCartRequestParams($elem), 12183 { 12184 rpc: true 12185 } 12186 ); 12187 } 12188 } else { 12189 xhr.reject(); 12190 } 12191 12192 return xhr; 12193}; 12194 12195ProductsListView.prototype.removeFormCartRequestParams = function (elem) { 12196 const pid = xcart.getValueFromClass(elem, 'productid'); 12197 12198 return { 12199 target: 'cart', 12200 action: 'remove', 12201 product_id: pid 12202 } 12203} 12204 12205ProductsListView.prototype.handleRemoveFromCart = function (XMLHttpRequest, textStatus, data, isValid) { 12206 if (!isValid) { 12207 xcart.trigger( 12208 'message', 12209 { 12210 text: 'An error occurred during removing the product from cart. Please refresh the page and try to remove the product from cart again or contact the store administrator.', 12211 type: 'error' 12212 } 12213 ); 12214 } 12215}; 12216 12217ProductsListView.prototype.focusOnFirstOption = _.once(function() { 12218 xcart.bind('afterPopupPlace', function(event, data){ 12219 if (popup.currentPopup.box.hasClass('ctrl-customer-quicklook')) { 12220 const option = popup.currentPopup.box.find('.editable-attributes select, input').filter(':visible').first(); 12221 option.focus(); 12222 } 12223 }) 12224}); 12225 12226ProductsListView.prototype.openQuickLook = function(elem) { 12227 this.focusOnFirstOption(); 12228 return !popup.load( 12229 URLHandler.buildURL(this.openQuickLookParams(elem)), 12230 function () { 12231 jQuery('.formError').hide(); 12232 }, 12233 50000 12234 ); 12235}; 12236 12237ProductsListView.prototype.handleCloseQuickLookPopup = function(event, data) 12238{ 12239 if (data.box && data.box.find('.product-quicklook').length > 0 && jQuery('body').find(data.box).length > 0) { 12240 data.box.dialog('destroy'); 12241 data.box.remove(); 12242 } 12243}; 12244 12245ProductsListView.prototype.openQuickLookParams = function (elem) { 12246 const product_id = xcart.getValueFromClass(elem, 'productid'); 12247 12248 return { 12249 target: 'quick_look', 12250 action: '', 12251 product_id: product_id, 12252 only_center: 1 12253 } 12254} 12255 12256// Get event namespace (prefix) 12257ProductsListView.prototype.getEventNamespace = function () { 12258 return 'list.products'; 12259}; 12260 12261ProductsListView.prototype.getChangeQuantityButtons = function (product) { 12262 const result = []; 12263 const buttons = [ 12264 product.find('.add-to-cart'), 12265 product.find('.increase-qty'), 12266 product.find('.decrease-qty') 12267 ]; 12268 12269 buttons.forEach((button) => { 12270 result.push({ 12271 'element': button, 12272 'disabledState': button.prop('disabled') 12273 }) 12274 }); 12275 12276 return result; 12277} 12278 12279/** 12280 * Load product lists controller 12281 */ 12282xcart.autoload(ProductsListController);; 12283/* AUTOGENERATED: script.js */ 12284/* vim: set ts=2 sw=2 sts=2 et: */ 12285 12286/** 12287 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 12288 * See https://www.x-cart.com/license-agreement.html for license details. 12289 */ 12290 12291function product_comparison() { 12292 jQuery('div.compare-checkbox').mouseover( 12293 function() { 12294 jQuery(this).parent().addClass('visible'); 12295 } 12296 ); 12297 12298 jQuery('.compare-checkbox input').not('.binded').each( 12299 function() { 12300 var pr = jQuery(this); 12301 pr.change( 12302 function() { 12303 var action = pr.prop('checked') ? 'add' : 'delete'; 12304 xcart.post( 12305 URLHandler.buildURL( 12306 { 12307 target: 'product_comparison', 12308 action: action 12309 } 12310 ), 12311 function(XMLHttpRequest, textStatus, data, valid) { 12312 if (data) { 12313 data = jQuery.parseJSON(data); 12314 if (data.count > 0) { 12315 jQuery('div.compare-popup').removeClass('hide_item'); 12316 } else { 12317 jQuery('div.compare-popup').addClass('hide_item'); 12318 } 12319 if (data.count > 1) { 12320 jQuery('button.compare').removeClass('disabled'); 12321 } else { 12322 jQuery('button.compare').addClass('disabled'); 12323 } 12324 jQuery('.compare-products-selected').text(data.title); 12325 } 12326 }, 12327 { 12328 target: 'product_comparison', 12329 action: action, 12330 product_id: pr.data('id') 12331 }, 12332 { 12333 rpc: true 12334 } 12335 ); 12336 } 12337 ); 12338 xcart.bind('updateProductComparison', 12339 function(event, data) { 12340 if (data.productId == pr.data('id')) { 12341 if (data.action == 'add') { 12342 pr.prop('checked', 'checked'); 12343 12344 } else { 12345 pr.prop('checked', false); 12346 } 12347 } 12348 } 12349 ); 12350 } 12351 ).addClass('binded'); 12352}; 12353/* AUTOGENERATED: script.js */ 12354/* vim: set ts=2 sw=2 sts=2 et: */ 12355 12356/** 12357 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 12358 * See https://www.x-cart.com/license-agreement.html for license details. 12359 */ 12360 12361xcart.bind( 12362 'load', 12363 function() { 12364 decorate( 12365 'ProductsListView', 12366 'postprocess', 12367 function(isSuccess, initial) 12368 { 12369 arguments.callee.previousMethod.apply(this, arguments); 12370 12371 if (isSuccess) { 12372 jQuery('div.product').mouseover( 12373 function() { 12374 jQuery(this).addClass('compare'); 12375 } 12376 ).mouseout( 12377 function() { 12378 jQuery(this).removeClass('compare'); 12379 } 12380 ); 12381 12382 jQuery('div.add-to-compare.products div.compare-popup').mouseleave( 12383 function() { 12384 jQuery(this).removeClass('visible'); 12385 } 12386 ); 12387 12388 product_comparison(); 12389 } 12390 } 12391 ); 12392 } 12393);; 12394/* AUTOGENERATED: attributetoform.js */ 12395/* vim: set ts=2 sw=2 sts=2 et: */ 12396 12397/** 12398 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 12399 * See https://www.x-cart.com/license-agreement.html for license details. 12400 */ 12401 12402jQuery(function () { 12403 $(document).on('click', '.add2cart', function () { 12404 var form_id = $('form.product-details').attr('id'); 12405 $('.editable-attributes :input').each(function () { 12406 $(this).attr('form', form_id); 12407 }); 12408 }); 12409});; 12410/* AUTOGENERATED: controller.js */ 12411/* vim: set ts=2 sw=2 sts=2 et: */ 12412 12413/** 12414 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 12415 * See https://www.x-cart.com/license-agreement.html for license details. 12416 */ 12417 12418/** 12419 * Controller 12420 */ 12421 12422function ProductDetailsController(base) 12423{ 12424 var o = this; 12425 ProductDetailsController.superclass.constructor.apply(this, arguments); 12426 12427 if ( 12428 this.base 12429 && this.base.get(0) 12430 && ( 12431 xcart.getCommentedData(jQuery('body'), 'product_id') 12432 || ( 12433 jQuery('form.product-details', this.base).get(0) 12434 && jQuery('form.product-details', this.base).get(0).elements.namedItem('product_id') 12435 ) 12436 ) 12437 ) { 12438 this.productId = xcart.getCommentedData(jQuery('body'), 'product_id') 12439 ? xcart.getCommentedData(jQuery('body'), 'product_id') 12440 : jQuery('form.product-details', this.base).get(0).elements.namedItem('product_id').value; 12441 12442 this.block = new ProductDetailsView(this.base, this.productId); 12443 12444 xcart.bind( 12445 'updateCart', 12446 function(event, data) { 12447 var i; 12448 12449 if (!_.isUndefined(data.items)) { 12450 for (i = 0; i < data.items.length; i++) { 12451 if (data.items[i].object_type == 'product' && data.items[i].object_id == o.productId) { 12452 if (0 < data.items[i].quantity && !jQuery('body').hasClass('added-product')) { 12453 jQuery('body').addClass('added-product') 12454 .removeClass('non-added-product'); 12455 12456 } else if (0 == data.items[i].quantity && jQuery('body').hasClass('added-product')) { 12457 jQuery('body').addClass('non-added-product') 12458 .removeClass('added-product'); 12459 } 12460 } 12461 } 12462 12463 if (!o.selfAdded) { 12464 for (i = 0; i < data.items.length; i++) { 12465 if (data.items[i].object_type == 'product' && data.items[i].object_id == o.productId) { 12466 o.block.load(); 12467 } 12468 } 12469 } 12470 } 12471 } 12472 ); 12473 12474 var use = this.base.data('use-widgets-collection'); 12475 if ('undefined' == typeof(use) || use) { 12476 xcart.callTriggersBind('update-product-page'); 12477 } 12478 } 12479} 12480 12481extend(ProductDetailsController, AController); 12482 12483// Prodiuct id 12484ProductDetailsController.prototype.productId = null; 12485 12486// Controller name 12487ProductDetailsController.prototype.name = 'ProductDetailsController'; 12488 12489// Find pattern 12490ProductDetailsController.prototype.findPattern = 'div.product-details'; 12491 12492// Controller associated main widget 12493ProductDetailsController.prototype.block = null; 12494 12495// Controller associated buttons block widget 12496ProductDetailsController.prototype.buttonsBlock = null; 12497 12498ProductDetailsController.prototype.selfAdded = false;
12499 12500// Initialize controller 12501ProductDetailsController.prototype.initialize = function() 12502{ 12503 this.base.bind( 12504 'reload', 12505 _.bind( 12506 function(event, box) { 12507 this.bind(box); 12508 }, 12509 this 12510 ) 12511 ); 12512}; 12513 12514/** 12515 * Main widget 12516 */ 12517 12518function ProductDetailsView (base, productId) { 12519 this.callSupermethod('constructor', arguments); 12520 12521 this.productId = productId; 12522 12523 this.bind('local.loaded', function () { 12524 xcart.trigger('update-product-page', productId); 12525 }); 12526 12527 xcart.bind('mm-menu.created', function(event, api){ 12528 if (_.has(jQuery, 'colorbox')) { 12529 jQuery.colorbox.remove(); 12530 } 12531 }); 12532 xcart.bind('initialize-product-gallery', _.bind(this.initializeGallery, this)); 12533 12534 this.linkClickHandler = _.bind( 12535 function(event) 12536 { 12537 event.stopPropagation(); 12538 12539 this.showLightbox(); 12540 jQuery('.product-image-gallery li.selected a', this.base).eq(0).trigger('click'); 12541 12542 return false; 12543 }, 12544 this 12545 ); 12546} 12547 12548extend(ProductDetailsView, ALoadable); 12549 12550// Prodiuct id 12551ProductDetailsView.prototype.productId = null; 12552 12553ProductDetailsView.prototype.shadeClass = 'wait-progress overlay-blur-base'; 12554// Widget target 12555ProductDetailsView.prototype.widgetTarget = 'product'; 12556 12557// Widget class name 12558ProductDetailsView.prototype.widgetClass = '\\XLite\\View\\Product\\Details\\Customer\\Page\\Main'; 12559 12560// Imgaes gallery 12561ProductDetailsView.prototype.galleries = null; 12562 12563// Zoom layer max. width 12564ProductDetailsView.prototype.zoomMaxWidth = 460; 12565 12566// Width after which the zoom will be initialized 12567ProductDetailsView.prototype.zoomWidth = 991; 12568 12569// Zoom widget 12570ProductDetailsView.prototype.zoomWidget = false; 12571 12572// Zoom layer max. width 12573ProductDetailsView.prototype.kZoom = 1.3; 12574 12575ProductDetailsView.prototype.shadeWidget = function() 12576{ 12577 return 0 == this.base.parents('.ui-dialog').length; 12578}; 12579 12580ProductDetailsView.prototype.preloadHandler = function () 12581{ 12582 if (this.hasClass('product-quicklook')) { 12583 popup.close(); 12584 } 12585}; 12586 12587ProductDetailsView.prototype.initializeGallery = function () 12588{ 12589 var self = this; 12590 self.galleries = []; 12591 jQuery('.product-image-gallery', this.base).each(function () { 12592 self.galleries.push($(this).find('li')); 12593 }); 12594}; 12595 12596ProductDetailsView.prototype.applyToGalleries = function (callback) 12597{ 12598 if (this.galleries) { 12599 var self = this; 12600 this.galleries.forEach(function (gallery) { 12601 callback.apply(self, [gallery]); 12602 }) 12603 } 12604}; 12605 12606// Postprocess widget 12607ProductDetailsView.prototype.postprocess = function(isSuccess, initial) 12608{ 12609 this.callSupermethod('postprocess', arguments); 12610 12611 if (isSuccess) { 12612 // Hide popup title 12613 jQuery(this.base).parents('.ui-dialog').eq(0).addClass('no-title'); 12614 12615 this.initializeGallery(); 12616 12617 var o = this; 12618 12619 // Bind the cloud zoom triggering event. 12620 // The element initializes itself the cloud zoom widget 12621 jQuery('.cloud-zoom', this.base).bind( 12622 'cloud-zoom', 12623 function (event) { 12624 var rel; 12625 if (jQuery(window).width() > o.zoomWidth) { 12626 if (jQuery(this).data('zoom')) { 12627 jQuery(this).data('zoom').destroy(); 12628 } 12629 12630 var baseRel = _.object(_.map(jQuery(this).data('rel-base').split(','), function (value, key, list) { 12631 return _.map(_.trim(value).split(':'), function (value) {return _.trim(value);}); 12632 })); 12633 jQuery(this).attr('data-rel', jQuery(this).data('rel-base')); 12634 12635 // adjust zoom width and height for current image 12636 var img = jQuery('img', this); 12637 12638 if (typeof jQuery(this).CloudZoom !== "undefined") { 12639 jQuery(this).CloudZoom(); 12640 }; 12641 12642 rel = xcart.getRelArray(jQuery(this)); 12643 rel.zoomWidth = Math.min(img.width(), baseRel.zoomWidth); 12644 rel.zoomHeight = Math.min(img.height(), baseRel.zoomHeight); 12645 rel.adjustX = intval(img.offset().left - jQuery(this).offset().left); 12646 12647 if (rel.position !== "'inside'") { 12648 rel.adjustX += 10; 12649 jQuery(this).closest('.cloud-zoom-photo').addClass('cloud-zoom-outside').removeClass('cloud-zoom-inside'); 12650 } 12651 12652 12653 xcart.setRelArray(jQuery(this), rel); 12654 12655 if (typeof jQuery(this).CloudZoom !== "undefined") { 12656 jQuery(this).CloudZoom(); 12657 }; 12658 12659 jQuery('.image .product-photo img', o.base).css({width: '', height: ''}); 12660 } else { 12661 jQuery(this).closest('.cloud-zoom-photo').removeClass('cloud-zoom-outside').addClass('cloud-zoom-inside'); 12662 12663 jQuery(this).attr('data-rel', jQuery(this).data('rel-base')); 12664 12665 if (jQuery(this).data('zoom')) { 12666 jQuery(this).data('zoom').destroy(); 12667 } 12668 12669 rel = xcart.getRelArray(jQuery(this)); 12670 12671 var photo = jQuery('.image .product-photo', o.base); 12672 rel.position = "'inside'"; 12673 rel.adjustX = intval( 12674 photo.find('img').offset().left - photo.find('.cloud-zoom').offset().left 12675 ); 12676 12677 xcart.setRelArray(jQuery(this), rel); 12678 12679 jQuery(this).CloudZoom(); 12680 12681 jQuery('.image .product-photo img', o.base).css({width: 'auto', height: 'auto'}); 12682 } 12683 } 12684 ); 12685 12686 // Arrow-based image navigation 12687 jQuery('.image .left-arrow', this.base).click( 12688 function (event) { 12689 o.switchImage(-1); 12690 } 12691 ); 12692 12693 jQuery('.image .right-arrow', this.base).click( 12694 function (event) { 12695 o.switchImage(1); 12696 } 12697 ); 12698 12699 // Form AJAX-based submit 12700 var form = this.base.find('form.product-details').get(0); 12701 if (form) { 12702 form.commonController
12703 .enableBackgroundSubmit() 12704 .bind('local.beforeSubmit', _.bind(this.addProductToCart, this)) 12705 .bind('local.submitted', _.bind(this.postprocessAdd2Cart, this)) 12706 } 12707 12708 // Cloud zoom 12709 var cloud = jQuery('.cloud-zoom', this.base); 12710 12711 if (cloud.length) { 12712 // The zoom effect is removed from Quick look 12713 this.zoomWidget = !this.base.hasClass('product-quicklook'); 12714 12715 if (xcart.getCommentedData(cloud, 'kZoom')) { 12716 this.kZoom = xcart.getCommentedData(cloud, 'kZoom'); 12717 } 12718 12719 var imageWrapper = jQuery(document.createElement('div')).addClass('wrapper'); 12720 12721 cloud.wrap(imageWrapper); 12722 } 12723 12724 // Change Continue shopping button for QuickLook mode 12725 if (this.base.hasClass('product-quicklook') && 0 < this.base.parents('.blockUI').length) { 12726 jQuery('button.continue', this.base) 12727 .unbind('click') 12728 .removeAttr('onclick'); 12729 jQuery('button.continue', this.base).click( 12730 function() { 12731 popup.close(); 12732 return false; 12733 } 12734 ); 12735 } 12736 12737 // Show Lightbox on the image click 12738 cloud.click( 12739 function(event) { 12740 o.showLightbox(); 12741 jQuery('.product-image-gallery li.selected a').eq(0).trigger('click'); 12742 12743 return false; 12744 } 12745 ); 12746 12747 // Gallery 12748 if (typeof(window.lightBoxImagesDir) != 'undefined') { 12749 jQuery('.loupe', this.base).click( 12750 function(event) { 12751 o.showLightbox(); 12752 setTimeout( 12753 function() { 12754 jQuery('.product-image-gallery li.selected a').eq(0).trigger('click'); 12755 }, 12756 500 12757 ); 12758 12759 return false; 12760 } 12761 ); 12762 } 12763 12764 this.hideLightbox(); 12765 12766 // Tabs 12767 var tabsBase = jQuery('.product-details-tabs', this.base); 12768 var initialURL = document.location.toString().split('#')[0]; 12769 12770 tabsBase.find('.tabs li a').click( 12771 _.bind( 12772 function (event) { 12773 event.preventDefault(); 12774 12775 var link = jQuery(event.currentTarget); 12776 this.openTab(link); 12777 12778 if (history.replaceState) { 12779 history.replaceState(null, null, initialURL + '#' + link.data('id')); 12780 12781 } else { 12782 self.location.hash = link.data('id'); 12783 } 12784 }, 12785 this 12786 ) 12787 ); 12788 12789 this.checkLocation(); 12790 12791 if (jQuery('.product-image-gallery li a', this.base).length) { 12792 // TODO: improve to skip additional JS manipulations 12793 // like resizing etc when it is not needed 12794 jQuery('.product-image-gallery li a', o.base).first().click(); 12795 } else if (this.zoomWidget && !cloud.data('zoom')) { 12796 cloud.trigger('cloud-zoom'); 12797 } 12798 12799 jQuery('a.link-to-tab').click( 12800 _.bind( 12801 function (event) { 12802 self.location = event.currentTarget.href; 12803 this.checkLocation(); 12804 }, 12805 this 12806 ) 12807 ); 12808 } 12809}; 12810 12811ProductDetailsView.prototype.openTab = function(link) 12812{ 12813 var tabsBase = jQuery('.product-details-tabs', this.base); 12814 12815 link = jQuery(link); 12816 tabsBase.find('.tabs li').removeClass('active'); 12817 link.parent().addClass('active'); 12818 12819 tabsBase.find('.tabs-container .tab-container').hide(); 12820 tabsBase.find('.tabs-container #' + link.data('id')).show(); 12821 12822 this.triggerVent('tab.open', { widget: this, tab: link }); 12823 12824 if (link.closest('.panel').find('.panel-collapse').length) { 12825 var pane = link.closest('.panel').find('.panel-collapse').first(); 12826 pane.on('transitionend webkitTransitionEnd oTransitionEnd', function () { 12827 pane.unbind('transitionend webkitTransitionEnd oTransitionEnd'); 12828 $('html, body').animate({ 12829 scrollTop: (link.offset().top - $('#header-area').height()) 12830 },300); 12831 }); 12832 12833 if (pane.hasClass('in')) { 12834 setTimeout(function () { 12835 $('html, body').animate({ 12836 scrollTop: (link.offset().top - $('#header-area').height()) 12837 }, 300); 12838 }, 0); 12839 pane.unbind('transitionend webkitTransitionEnd oTransitionEnd'); 12840 } 12841 pane.collapse('show'); 12842 } 12843}; 12844 12845ProductDetailsView.prototype.checkLocation = function() 12846{ 12847 var hash = ((self.location.hash) + '').replace(/^#/, ''); 12848 if (hash) { 12849 var tabsBase = jQuery('.product-details-tabs', this.base); 12850 var found = null; 12851 12852 var state = { 12853 'widget': this, 12854 'hash': hash 12855 }; 12856 12857 this.triggerVent('tab.hash.resolve', state); 12858 hash = state.hash; 12859 12860 tabsBase.find('.tabs li a').each( 12861 function() { 12862 var link = jQuery(this); 12863 if (link.data('id') == hash) { 12864 found = link; 12865 } else if (link.data('alt-id') == hash) { 12866 found = link; 12867 } 12868 } 12869 ); 12870 12871 state = { 12872 'tab': found, 12873 'widget': this, 12874 'hash': hash 12875 }; 12876 12877 this.triggerVent('tab.detection', state); 12878 12879 if (state.tab) { 12880 this.openTab(state.tab); 12881 } else { 12882 tabsBase.find('a[data-id="' + hash + '"]').first().click(); 12883 } 12884 } else { 12885 var tabsBase = jQuery('.product-details-tabs', this.base); 12886 this.openTab(tabsBase.find('.tabs li a').first()); 12887 } 12888}; 12889 12890ProductDetailsView.prototype.showLightbox = function() 12891{ 12892 if (_.has(jQuery, 'colorbox')) { 12893 jQuery('.product-image-gallery a', this.base) 12894 .unbind('click') 12895 .colorbox(this.getColorboxOptions()); 12896 }; 12897}; 12898 12899ProductDetailsView.prototype.hideLightbox = function() 12900{ 12901 var o = this; 12902 12903 jQuery('.product-image-gallery a', this.base) 12904 .unbind('click') 12905 .bind( 12906 'click', 12907 function(event) { 12908 event.stopPropagation(); 12909 o.selectImage( 12910 jQuery.inArray(this, jQuery(this).parents('ul').eq(0).find('a').get()) 12911 ); 12912 12913 return false;
12914 } 12915 ); 12916}; 12917 12918ProductDetailsView.prototype.getColorboxOptions = function () { 12919 return { 12920 onComplete: function () { 12921 jQuery('#cboxCurrent').css('display', 'none'); 12922 jQuery('#cboxTitle').text(jQuery('img', this).attr('alt')); 12923 }, 12924 onClosed: _.bind(this.hideLightbox, this), 12925 maxWidth: jQuery(window).width(), 12926 maxHeight: jQuery(window).height(), 12927 title: jQuery('.product-photo img', this.base).attr('alt') 12928 }; 12929}; 12930 12931// Get base element for shade / unshade operation 12932ProductDetailsView.prototype.getShadeBase = function () { 12933 return jQuery('.shade-base', this.base).eq(0); 12934}; 12935 12936// Image gallery switcher 12937ProductDetailsView.prototype.switchImage = function (diff) { 12938 var next = -1; 12939 12940 this.applyToGalleries(function (gallery) { 12941 if (next !== -1) { 12942 return; 12943 } 12944 var selected = -1; 12945 var i = 0; 12946 12947 // Detect current index 12948 gallery.each(function () { 12949 if (selected === -1 && jQuery(this).hasClass('selected')) { 12950 selected = i; 12951 } 12952 i++; 12953 }); 12954 12955 if (selected === -1) { 12956 selected = 0; 12957 } 12958 12959 // Calculate new position 12960 next = selected + diff; 12961 12962 if (next < 0) { 12963 next = gallery.length - Math.abs(next) % gallery.length; 12964 } else if (next >= gallery.length) { 12965 next = next % gallery.length; 12966 } 12967 }); 12968 12969 this.selectImage(next); 12970}; 12971 12972// Select image from gallery 12973ProductDetailsView.prototype.selectImage = function (pos) { 12974 this.applyToGalleries(function (gallery) { 12975 gallery.removeClass('selected'); 12976 12977 // Refresh main image and another options + cloud zoom plugin restart 12978 var next = gallery.eq(pos); 12979 next.addClass('selected'); 12980 12981 if (this.zoomWidget) { 12982 var cloud = jQuery('.cloud-zoom', this.base); 12983 12984 if (cloud.data('zoom')) { 12985 cloud.data('zoom').destroy(); 12986 } else { 12987 cloud.unbind('click', this.linkClickHandler); 12988 } 12989 12990 cloud.attr('href', jQuery('a', next).attr('href')); 12991 } 12992 12993 var middle = jQuery('img.middle', next).eq(0); 12994 if (middle.length > 0) { 12995 var src = middle.attr('src') || null; 12996 var srcset = middle.attr('srcset') || null; 12997 var alt = middle.attr('alt') || null; 12998 jQuery('.image .product-photo img', this.base) 12999 .hide() 13000 .attr('src', src) 13001 .attr('srcset', srcset) 13002 .attr('alt', alt) 13003 .show(); 13004 } 13005 13006 if (jQuery('a', next).length) { 13007 var params = jQuery('a', next).attr('rev'); 13008 13009 if (this.zoomWidget && params) { 13010 var tmp = xcart.parseObjectString('{' + params + '}'); 13011 if ( 13012 tmp && 13013 (tmp.width > (middle.width() * this.kZoom) 13014 || tmp.height > (middle.width() * this.kZoom)) 13015 ) { 13016 cloud.trigger('cloud-zoom'); 13017 } else { 13018 cloud.click(this.linkClickHandler); 13019 } 13020 } 13021 } 13022 }) 13023}; 13024 13025// Get additional parameters 13026ProductDetailsView.prototype.getParams = function(params) 13027{ 13028 params = this.callSupermethod('getParams', arguments); 13029 13030 params.product_id = this.productId; 13031 params.added = 1; 13032 13033 return params; 13034}; 13035 13036// Form submit handler 13037ProductDetailsView.prototype.addProductToCart = function(event) 13038{ 13039 // We do not shade widgets collection after the product is added to cart 13040 xcart.doShadeWidgetsCollection = false; 13041 this.base.get(0).controller.selfAdded = true; 13042 this.gatherFormFields(); 13043}; 13044 13045ProductDetailsView.prototype.gatherFormFields = function() 13046{ 13047 var elements = jQuery('input:not(:checkbox,:radio),select,textarea,input:checkbox:checked,input:radio:checked', this.base); 13048 13049 for (i = 0; i < elements.length; i++) { 13050 if ( 13051 (jQuery(elements[i]).hasClass('form-control') 13052 || jQuery(elements[i]).parents('.attribute-values').length !== 0 13053 ) 13054 && 0 == jQuery(elements[i]).parents('form').length 13055 ) { 13056 jQuery('<input>').attr({ 13057 type: 'hidden', 13058 name: jQuery(elements[i]).prop('name'), 13059 value: jQuery(elements[i]).val() 13060 }).appendTo('form.product-details'); 13061 } 13062 } 13063} 13064 13065// Form POST processor 13066ProductDetailsView.prototype.postprocessAdd2Cart = function(event, data) 13067{ 13068 this.base.get(0).controller.selfAdded = false;
13069 13070 data.isValid ? this.load() : this.unshade(); 13071}; 13072 13073// Get event namespace (prefix) 13074ProductDetailsView.prototype.getEventNamespace = function() 13075{ 13076 return 'block.product.details'; 13077}; 13078 13079xcart.autoload(ProductDetailsController); 13080 13081xcart.bind('updateCart', (event, data) => { 13082 let isProductInCart = false; 13083 const productDetailsBlock = document.querySelector('.product-details.box-product'); 13084 if (data.items && productDetailsBlock) { 13085 const productId = parseInt(document.querySelector('input[name="product_id"]').value); 13086 data.items.forEach(item => { 13087 if (item.object_id === productId) { 13088 isProductInCart = true; 13089 } 13090 }); 13091 productDetailsBlock.classList.toggle('product-added', isProductInCart); 13092 } 13093}); 13094 13095xcart.bind( 13096 'update-product-page', 13097 function (event, productId) 13098 { 13099 xcart.processUpdateWidgetsCollection( 13100 'update-product-page', 13101 '\\XLite\\View\\ProductPageCollection', 13102 {product_id: productId}, 13103 '.product-info-' + productId 13104 ); 13105 } 13106); 13107 13108var resizerTimer; 13109 13110jQuery(window).resize( 13111 function (event) { 13112 clearTimeout(resizerTimer); 13113 resizerTimer = setTimeout( 13114 function () { 13115 jQuery('.cloud-zoom').trigger('cloud-zoom'); 13116 }, 13117 500 13118 ); 13119 } 13120); 13121 13122define("ProductDetails", function () {});; 13123/* AUTOGENERATED: controller.js */ 13124/* vim: set ts=2 sw=2 sts=2 et: */ 13125 13126/** 13127 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 13128 * See https://www.x-cart.com/license-agreement.html for license details. 13129 */ 13130 13131var old_postprocess = ProductDetailsView.prototype.postprocess; 13132ProductDetailsView.prototype.postprocess = function(isSuccess, initial) { 13133 old_postprocess.apply(this, arguments); 13134 13135 if (isSuccess) { 13136 var initialURL = document.location.toString().split('#')[0]; 13137 $('.product-tabs-brief-info li a').click( 13138 _.bind( 13139 function (event) { 13140 event.preventDefault(); 13141 var id = $(event.currentTarget).data('id'); 13142 13143 var link = jQuery($('.product-details .product-details-tabs a[data-id="' + id + '"]')); 13144 13145 if (!link.length) { 13146 link = jQuery($('.product-details .product-details-tabs a[data-alt-id="' + id + '"]')); 13147 } 13148 13149 this.openTab(link); 13150 13151 if (history.replaceState) { 13152 history.replaceState(null, null, initialURL + '#' + link.data('id')); 13153 13154 } else { 13155 self.location.hash = link.data('id'); 13156 } 13157 13158 $('html, body').animate({ 13159 scrollTop: $('.product-details .product-details-tabs').offset().top - 100 13160 }, 800, 'easeInOutCubic').on('mousewheel', function () { 13161 $(this).stop(); 13162 }); 13163 }, 13164 this 13165 ) 13166 ); 13167 } 13168};; 13169/* AUTOGENERATED: product.js */ 13170/* vim: set ts=2 sw=2 sts=2 et: */ 13171 13172/** 13173 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 13174 * See https://www.x-cart.com/license-agreement.html for license details. 13175 */ 13176 13177function getStickyImageTop() { 13178 let result = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--rhythmic-unit')); 13179 if (!result) { 13180 result = 0; 13181 } 13182 13183 return result + getActiveWindowTop(); 13184} 13185 13186/* Product photo is sticky only if the window's active height is not bigger than the photo's height. */ 13187const maybeMakePhotoSticky = () => { 13188 const photoContainer = document.querySelector('.image-container'); 13189 13190 if (photoContainer) { 13191 const photoArea = photoContainer.querySelector('.image-container .image-wrapper'); 13192 13193 if (photoArea) { 13194 const photoContainerRect = photoContainer.getBoundingClientRect(); 13195 const productAreaRect = photoContainer.parentNode.getBoundingClientRect(); 13196 const isSticky = photoContainerRect.width < productAreaRect.width 13197 && getActiveWindowHeight() >= photoArea.getBoundingClientRect().height; 13198 13199 photoArea.classList.toggle('image--sticky', isSticky); 13200 if (isSticky) { 13201 document.documentElement.style.setProperty('--image-top', `${getStickyImageTop()}px`); 13202 } 13203 } 13204 } 13205}; 13206 13207const updatePriceBlockRightMargin = () => { 13208 let priceBlockRightMargin = 0; 13209 const priceBlock = document.querySelector('.product-price-base'); 13210 const buttonsRow = document.querySelector('.product-buttons .buttons-row'); 13211 const buttonsCell = buttonsRow?.querySelector('.add-button-buttons'); 13212 13213 if ( 13214 priceBlock 13215 && buttonsCell 13216 ) { 13217 if (window.matchMedia('(min-width: 480px) and (max-width: 767px)').matches) { 13218 priceBlockRightMargin = buttonsCell.getBoundingClientRect().width 13219 + parseInt(window.getComputedStyle(buttonsRow).columnGap
13219); 13220 13221 if (isNaN(priceBlockRightMargin)) { 13222 priceBlockRightMargin = 0; 13223 } 13224 } else if (window.matchMedia('(min-width: 992px)').matches) { 13225 priceBlockRightMargin = Math.floor( 13226 buttonsRow.getBoundingClientRect().right - buttonsCell.getBoundingClientRect().right 13227 ); 13228 } 13229 } 13230 13231 priceBlockRightMargin = Math.max(0, priceBlockRightMargin); 13232 13233 priceBlock?.style.setProperty('--price-block-right-margin', `${priceBlockRightMargin}px`); 13234 priceBlock?.classList.add('initialized'); 13235}; 13236 13237const repaintProductPageElements = () => { 13238 maybeMakePhotoSticky(); 13239 updatePriceBlockRightMargin(); 13240}; 13241 13242repaintProductPageElements(); 13243document.addEventListener('DOMContentLoaded', repaintProductPageElements); 13244window.addEventListener('load', repaintProductPageElements); 13245window.addEventListener('resize', repaintProductPageElements); 13246window.addEventListener('orientationchange', repaintProductPageElements); 13247 13248document.addEventListener('DOMContentLoaded', () => { 13249 const handler = ProductDetailsView.prototype.getColorboxOptions; 13250 13251 ProductDetailsView.prototype.getColorboxOptions = function () { 13252 const func = _.bind(handler, this); 13253 const result = func(); 13254 const onComplete = result.onComplete; 13255 const onClosed = result.onClosed; 13256 const onLoad = result.onLoad; 13257 const onOpen = result.onOpen; 13258 const arrowElement = document.querySelector('.top-menu__categories-item-further-icon'); 13259 13260 const updateColorboxButtonsContent = () => { 13261 if (arrowElement) { 13262 const arrowHTML = arrowElement.outerHTML.replace('top-menu__categories-item-further-icon', ''); 13263 const prevButton = document.getElementById('cboxPrevious'); 13264 const nextButton = document.getElementById('cboxNext'); 13265 const closeButton = document.getElementById('cboxClose'); 13266 const preloader = document.getElementById('cboxLoadingGraphic'); 13267 13268 if (prevButton) { 13269 prevButton.innerHTML = arrowHTML; 13270 } 13271 if (nextButton) { 13272 nextButton.innerHTML = arrowHTML; 13273 } 13274 if (closeButton) { 13275 closeButton.innerHTML = '<svg class="inline-icon inline-icon--plus" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 2.4a1.2 1.2 0 0 0-1.2 1.2v7.2H3.6a1.2 1.2 0 1 0 0 2.4h7.2v7.2a1.2 1.2 0 0 0 2.4 0v-7.2h7.2a1.2 1.2 0 0 0 0-2.4h-7.2V3.6A1.2 1.2 0 0 0 12 2.4Z" fill="currentColor"></path></svg>'; 13276 } 13277 if (preloader) { 13278 preloader.innerHTML = getPreloaderSVG(); 13279 } 13280 } 13281 }; 13282 13283 result.onComplete = function () { 13284 updateColorboxButtonsContent(); 13285 onComplete(); 13286 }; 13287 13288 result.onOpen = function () { 13289 updateColorboxButtonsContent(); 13290 document.body.classList.add('colorbox-opened'); 13291 if (onOpen) { 13292 onOpen(); 13293 } 13294 }; 13295 13296 result.onLoad = function () { 13297 updateColorboxButtonsContent(); 13298 if (onLoad) { 13299 onLoad(); 13300 } 13301 }; 13302 13303 result.onClosed = function () { 13304 document.body.classList.remove('colorbox-opened'); 13305 if (onClosed) { 13306 onClosed(); 13307 } 13308 }; 13309 13310 return result; 13311 }; 13312 13313 const productDetailsContainer = document.querySelector('.product-details')?.parentNode; 13314 if (productDetailsContainer) { 13315 (new MutationObserver(updatePriceBlockRightMargin)).observe( 13316 productDetailsContainer, 13317 { 13318 childList: true, 13319 subtree: true, 13320 attributes: false, 13321 characterData: true 13322 } 13323 ); 13324 } 13325}); 13326 13327(function () { 13328 13329 let space = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--rhythmic-unit')); 13330 if (isNaN(space)) { 13331 space = 0; 13332 } 13333 space += 20; 13334 13335 const listScroller = document.querySelector('div.tabs'); 13336 13337 if (listScroller) { 13338 13339 const maybeScrollList = function () { 13340 const activeListItem = document.querySelector('ul.tabs.primary li.active'); 13341 const rect = activeListItem.getBoundingClientRect(); 13342 13343 if (rect.left < space) { 13344 listScroller.scrollBy(rect.left - space, 0); 13345 } else if (rect.right >= window.innerWidth - space) { 13346 listScroller.scrollBy(rect.right - window.innerWidth + space, 0); 13347 } 13348 }; 13349 13350 const observer = new MutationObserver(maybeScrollList); 13351 13352 observer.observe( 13353 listScroller, 13354 { 13355 attributes: true, 13356 childList: true, 13357 subtree: true 13358 } 13359 ); 13360 13361 maybeScrollList(); 13362 13363 window.addEventListener('resize', maybeScrollList, {passive: true}); 13364 } 13365})();; 13366/* AUTOGENERATED: fitment.js */ 13367/* vim: set ts=2 sw=2 sts=2 et: */ 13368 13369/** 13370 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 13371 * See https://www.x-cart.com/license-agreement.html for license details. 13372 */ 13373 13374xcart.microhandlers.add( 13375 'product-fitment-click-handler', 13376 '.product-fitment:not(.fitment-type-universal)', 13377 function () { 13378 this.addEventListener('click', () => { 13379 let specLink = document.querySelector('a[data-id="product-details-tab-specification"]'); 13380 let specTable = document.querySelector('#product-details-tab-specification .product-fitment-tab-table'); 13381 13382 if (!specTable) { 13383 specLink = document.querySelector('a[data-id="product-details-tab-fitment"]'); 13384 specTable = document.querySelector('#product-details-tab-fitment .product-fitment-tab-table'); 13385 } 13386 13387 if (specLink && specTable) { 13388 specLink.click(); 13389 requestAnimationFrame(() => { 13390 jQuery('html').animate({ 13391 scrollTop: window.scrollY 13392 + specTable.parentNode.previousElementSibling.getBoundingClientRect().top 13393 - getActiveWindowTop() 13394 }); 13395 }); 13396 } 13397 }); 13398 } 13399);; 13400/* AUTOGENERATED: gallery.js */ 13401/* vim: set ts=2 sw=2 sts=2 et: */ 13402 13403/** 13404 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 13405 * See https://www.x-cart.com/license-agreement.html for license details. 13406 */ 13407 13408const ProductGallery = function (root) { 13409 13410 const isMobileMode = () => { 13411 return getComputedStyle(root).overflowY === 'hidden'; 13412 }; 13413 13414 const imageLinks = root.querySelectorAll('a[rel="lightbox"]'); 13415 const list = root.querySelector('ul'); 13416 const container = root.parentNode; 13417 const prevButton = container.querySelector('.product-image-gallery__nav--prev'); 13418 const nextButton = container.querySelector('.product-image-gallery__nav--next'); 13419 let navContainer = document.querySelector('.gallery-nav__container'); 13420 let navButtons = []; 13421 let isAutoScrolling = false;
13422 13423 if (!navContainer) { 13424 navContainer = document.createElement('DIV'); 13425 navContainer.className = 'gallery-nav__container'; 13426 container.appendChild(navContainer); 13427 } 13428 13429 const fullUpdate = () => { 13430 updatePagesCount(); 13431 this.updateActiveButton(); 13432 updatePrevNextButtons(); 13433 }; 13434 13435 const isButtonActive = (i) => { 13436 return navButtons[i] && navButtons[i].classList.contains('gallery-nav__button--active'); 13437 }; 13438 13439 const updatePrevNextButtons = () => { 13440 if (isMobileMode()) { 13441 const rootClientWidth = root.getBoundingClientRect().width; 13442 13443 if (root.scrollLeft > 0 && prevButton.hasAttribute('disabled')) { 13444 prevButton.removeAttribute('disabled'); 13445 } else if (root.scrollLeft <= 0 && !prevButton.hasAttribute('disabled')) { 13446 prevButton.setAttribute('disabled', 'disabled'); 13447 } 13448 13449 if (root.scrollLeft + rootClientWidth < root.scrollWidth && nextButton.hasAttribute('disabled')) { 13450 nextButton.removeAttribute('disabled'); 13451 } else if (root.scrollLeft + rootClientWidth >= root.scrollWidth && !nextButton.hasAttribute('disabled')) { 13452 nextButton.setAttribute('disabled', 'disabled'); 13453 } 13454 } else { 13455 const rootClientHeight = root.getBoundingClientRect().height; 13456 13457 if (root.scrollTop > 0 && prevButton.hasAttribute('disabled')) { 13458 prevButton.removeAttribute('disabled'); 13459 } else if (root.scrollTop <= 0 && !prevButton.hasAttribute('disabled')) { 13460 prevButton.setAttribute('disabled', 'disabled'); 13461 } 13462 13463 if (root.scrollTop + rootClientHeight < root.scrollHeight && nextButton.hasAttribute('disabled')) { 13464 nextButton.removeAttribute('disabled'); 13465 } else if (root.scrollTop + rootClientHeight >= root.scrollHeight && !nextButton.hasAttribute('disabled')) { 13466 nextButton.setAttribute('disabled', 'disabled'); 13467 } 13468 } 13469 }; 13470 13471 this.getPagesCount = () => { 13472 let result = 0; 13473 13474 if (isMobileMode()) { 13475 const rootWidth = root.getBoundingClientRect().width; 13476 13477 result = Math.ceil(list.scrollWidth / rootWidth); 13478 if (list.scrollWidth % rootWidth < 20) { 13479 result--; 13480 } 13481 } else { 13482 result = Math.ceil(list.scrollHeight / root.getBoundingClientRect().height); 13483 } 13484 13485 return result; 13486 }; 13487 13488 const updatePagesCount = () => { 13489 let newCount = this.getPagesCount(); 13490 13491 container.classList.toggle('gallery--single-screen', (newCount < 2)); 13492 container.classList.toggle('gallery--multi-screen', (newCount >= 2)); 13493 13494 if (newCount < 2) { 13495 13496 if (navButtons.length) { 13497 navButtons.forEach(btn => { 13498 btn.parentNode.removeChild(btn); 13499 }); 13500 navButtons = []; 13501 } 13502 13503 } else if (newCount < navButtons.length) { 13504 13505 for (let i = newCount; i < navButtons.length; i++) { 13506 navButtons[i].parentNode.removeChild(navButtons[i]); 13507 } 13508 navButtons.splice(newCount); 13509 13510 } else if (newCount > navButtons.length) { 13511 13512 let i = navButtons.length; 13513 for (; i < newCount; i++) { 13514 let btn = document.createElement('BUTTON'); 13515 let page = i; 13516 13517 btn.className = 'gallery-nav__button'; 13518 btn.addEventListener('click', () => { 13519 this.setPage(page); 13520 }); 13521 13522 navButtons.push(btn); 13523 navContainer.appendChild(btn); 13524 } 13525 13526 } 13527 }; 13528 13529 this.setPage = (i) => { 13530 this.setActiveButton(i); 13531 isAutoScrolling = true; 13532 root.scrollTo(i * root.getBoundingClientRect().width, 0); 13533 13534 setTimeout(() => { 13535 isAutoScrolling = false; 13536 }, 500); 13537 }; 13538 13539 /** 13540 * @param {number} i 13541 * @return void 13542 */ 13543 this.setActiveButton = (i) => { 13544 if (navButtons.length === 0) { 13545 return; 13546 } 13547 13548 while (i < 0) { 13549 i += navButtons.length; 13550 } 13551 while (i >= navButtons.length) { 13552 i -= navButtons.length; 13553 } 13554 13555 if (!isButtonActive(i)) { 13556 navButtons.forEach((btn, j) => { 13557 btn.classList.toggle('gallery-nav__button--active', (i === j)); 13558 }); 13559 } 13560 }; 13561 13562 /** 13563 * @return {number} 13564 */ 13565 this.getActivePage = () => { 13566 const rootClientWidth = root.getBoundingClientRect().width; 13567 13568 if (root.scrollLeft + rootClientWidth >= root.scrollWidth - 20) { 13569 return this.getPagesCount() - 1; 13570 } 13571 13572 return Math.floor((root.scrollLeft + rootClientWidth - 80) / rootClientWidth); 13573 }; 13574 13575 this.updateActiveButton = () => { 13576 this.setActiveButton(this.getActivePage()); 13577 }; 13578 13579 const scrollHandler = () => { 13580 updatePrevNextButtons(); 13581 if (!isAutoScrolling) { 13582 this.updateActiveButton(); 13583 } 13584 }; 13585 13586 fullUpdate(); 13587 root.classList.add('handled'); 13588 13589 window.addEventListener('resize', fullUpdate); 13590 window.addEventListener('orientationchange', fullUpdate); 13591 13592 root.addEventListener('scroll', scrollHandler); 13593 13594 prevButton.addEventListener('click', () => { 13595 if (isMobileMode()) { 13596 root.scrollBy(-root.getBoundingClientRect().width, 0); 13597 } else { 13598 root.scrollBy(0, -root.getBoundingClientRect().height); 13599 } 13600 }); 13601 13602 nextButton.addEventListener('click', () => { 13603 if (isMobileMode()) { 13604 root.scrollBy(root.getBoundingClientRect().width, 0); 13605 } else { 13606 root.scrollBy(0, root.getBoundingClientRect().height); 13607 } 13608 }); 13609 13610 imageLinks.forEach((link, i) => { 13611 link.addEventListener('click', () => { 13612 const rect = link.getBoundingClientRect(); 13613 const rootRect = root.getBoundingClientRect(); 13614 13615 let space = Math.max(0, parseInt(getComputedStyle(link).getPropertyValue('--page-hspace'))); 13616 if (!space) { 13617 space = 0; 13618 } 13619 13620 if (isMobileMode()) { 13621 13622 if (rect.right > rootRect.right - space) { 13623 root.scrollBy(rect.right - rootRect.right + space, 0); 13624 } else if (rect.left < rootRect.left + space) { 13625 root.scrollBy(rect.left - rootRect.left - space, 0); 13626 } 13627 13628 } else { 13629 13630 if (rect.bottom > rootRect.bottom - space) { 13631 root.scrollBy(0, rect.bottom - rootRect.bottom + space); 13632 } else if (rect.top < rootRect.top + space) { 13633 root.scrollBy(0, rect.top - rootRect.top - space); 13634 } 13635 13636 } 13637 }); 13638 }); 13639}; 13640 13641xcart.microhandlers.add( 13642 'ProductGallery', 13643 '.product-image-gallery:not(.handled)', 13644 function () { 13645 new ProductGallery(this); 13646 } 13647);; 13648/* AUTOGENERATED: controller.js */ 13649/* vim: set ts=2 sw=2 sts=2 et: */ 13650 13651/** 13652 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 13653 * See https://www.x-cart.com/license-agreement.html for license details. 13654 */ 13655 13656/** 13657 * Controller 13658 */ 13659 13660function ProductQuantityBoxView(base) 13661{ 13662 this.base = jQuery(base); 13663 13664 if (this.base && this.base.length && this.base.find('input.quantity').length > 0) { 13665 13666 this.block = this.base.find('input.quantity'); 13667 13668 var form = this.block.get(0).form; 13669 form.commonController.switchControlReadiness(true); 13670 13671 form.commonController 13672 .bind('local.ready', _.bind(this.handleFormReady, this)) 13673 .bind('local.unready', _.bind(this.handleFormUnready, this)); 13674 13675 this.block.on( 13676 'input', 13677 _.bind(this.handleQuantityChange, this) 13678 ); 13679 13680 this.isCartPage = jQuery('div#cart').length > 0; 13681 13682 if (!this.isCartPage) { 13683 13684 this.actionButton = jQuery(this.base) 13685 .parents('div.product-buttons') 13686 .find('button.add2cart, button.buy-more'); 13687 13688 } else { 13689 13690 this.actionButton = jQuery('ul.totals li.button button'); 13691 13692 } 13693 } 13694 13695 Base.apply(this, arguments); 13696 13697 this.initialize(); 13698} 13699 13700extend(ProductQuantityBoxView, Base); 13701 13702// Controller associated main widget 13703ProductQuantityBoxView.prototype.base = null; 13704 13705// Controller associated main widget 13706ProductQuantityBoxView.prototype.block = null; 13707 13708// Controller associated main widget 13709ProductQuantityBoxView.prototype.isCartPage = false;
13710 13711// Initialize controller 13712ProductQuantityBoxView.prototype.initialize = function() 13713{ 13714}; 13715 13716ProductQuantityBoxView.prototype.handleQuantityChange = function(event) 13717{ 13718 jQuery(event.currentTarget).change(); 13719} 13720 13721ProductQuantityBoxView.prototype.handleFormReady = function(event) 13722{ 13723 this.actionButton 13724 .removeAttr('disabled') 13725 .removeClass('disabled add2cart-disabled'); 13726} 13727 13728ProductQuantityBoxView.prototype.handleFormUnready = function(event) 13729{ 13730 this.actionButton 13731 .prop('disabled', 'disabled') 13732 .addClass('disabled add2cart-disabled'); 13733} 13734 13735// Get event namespace (prefix) 13736ProductQuantityBoxView.prototype.getEventNamespace = function() 13737{ 13738 return 'product.details.quantityBox'; 13739} 13740 13741xcart.registerTriggersBind( 13742 'update-product-page', 13743 function() 13744 { 13745 var container = jQuery('span.quantity-box-container'); 13746 13747 new ProductQuantityBoxView(container); 13748 if (container.parents('form').get(0) && container.parents('form').get(0).commonController) { 13749 container.parents('form').get(0).commonController.bindElements(); 13750 } 13751 } 13752); 13753 13754xcart.registerShadowWidgets( 13755 'update-product-page', 13756 function() 13757 { 13758 return '.widget-fingerprint-product-quantity, .widget-fingerprint-product-add-button'; 13759 } 13760);; 13761/* AUTOGENERATED: quantity.js */ 13762/* vim: set ts=2 sw=2 sts=2 et: */ 13763 13764/** 13765 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 13766 * See https://www.x-cart.com/license-agreement.html for license details. 13767 */ 13768 13769const QuantityBox = function (root) { 13770 const decreaseQtyBtn = root.querySelector('.decrease-qty'); 13771 const increaseQtyBtn = root.querySelector('.increase-qty'); 13772 const qtyField = root.querySelector('.qty-in-cart'); 13773 13774 const getCurrentCount = () => {
13775 let count = parseInt(qtyField.value); 13776 if (!count) { // In case of count is NaN 13777 count = -1; 13778 } 13779 13780 return count; 13781 }; 13782 13783 const updateQuantity = (count, triggerUpdate = true) => { 13784 const min = parseInt(qtyField.getAttribute('min')); 13785 const max = parseInt(qtyField.getAttribute('data-max')); 13786 13787 if (min && max) { 13788 count = parseInt(count); 13789 if (!count) { // In case of count is NaN 13790 count = 0; 13791 } 13792 13793 count = Math.min(max, Math.max(min, Math.abs(count))); 13794 13795 if (count <= min) { 13796 decreaseQtyBtn.setAttribute('disabled', 'disabled'); 13797 } else { 13798 decreaseQtyBtn.removeAttribute('disabled'); 13799 } 13800 decreaseQtyBtn.classList.toggle('disabled', (count <= min)); 13801 13802 if (count >= max) { 13803 increaseQtyBtn.setAttribute('disabled', 'disabled'); 13804 } else { 13805 increaseQtyBtn.removeAttribute('disabled'); 13806 } 13807 increaseQtyBtn.classList.toggle('disabled', (count >= max)); 13808 13809 qtyField.value = count; 13810 if (qtyField.classList.contains('watcher') && triggerUpdate && qtyField.validate()) { 13811 qtyField.dispatchEvent(new Event('blur')); 13812 } 13813 qtyField.dispatchEvent(new Event('focus')); 13814 if (triggerUpdate) { 13815 qtyField.dispatchEvent(new Event('change')); 13816 } 13817 } 13818 }; 13819 13820 increaseQtyBtn.addEventListener('click', () => { 13821 updateQuantity(getCurrentCount() + 1); 13822 }); 13823 13824 decreaseQtyBtn.addEventListener('click', () => { 13825 updateQuantity(getCurrentCount() - 1); 13826 }); 13827 13828 qtyField.addEventListener('input', () => { 13829 updateQuantity(qtyField.value, false); 13830 }); 13831 13832 root.classList.add('handled'); 13833}; 13834 13835xcart.microhandlers.add( 13836 'QuantityBoxes', 13837 '.change-qty:not(.handled)', 13838 function () { 13839 new QuantityBox(this); 13840 } 13841);; 13842/* AUTOGENERATED: script.js */ 13843/* vim: set ts=2 sw=2 sts=2 et: */ 13844 13845/** 13846 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 13847 * See https://www.x-cart.com/license-agreement.html for license details. 13848 */ 13849 13850// Get product attribute element by name 13851function product_attribute(name_of_attribute) 13852{ 13853 var e = jQuery('form[name="add_to_cart"] :input').filter( 13854 function() { 13855 return this.name && this.name.search(name_of_attribute) !== -1; 13856 } 13857 ); 13858 13859 return e.get(0); 13860} 13861 13862let textAttrCache = []; 13863 13864function getAttributeValuesParams(product) 13865{ 13866 let activeAttributeValues = ''; 13867 let base = '.product-info-' + product.product_id; 13868 13869 jQuery("ul.attribute-values input[type=checkbox]", jQuery(base).last()).each(function(index, elem) { 13870 activeAttributeValues += jQuery(elem).data('attribute-id') + '_'; 13871 activeAttributeValues += jQuery(elem).is(":checked") ? jQuery(elem).val() : jQuery(elem).data('unchecked'); 13872 activeAttributeValues += ','; 13873 }); 13874 13875 jQuery("ul.attribute-values select", jQuery(base).last()).each(function(index, elem) { 13876 activeAttributeValues += jQuery(elem).data('attribute-id') + '_' + jQuery(elem).val() + ','; 13877 }); 13878 13879 jQuery("ul.attribute-values textarea", jQuery(base).last()).each(function(index, elem) { 13880 textAttrCache[jQuery(elem).data('attribute-id')] = jQuery(elem).val(); 13881 }); 13882 13883 jQuery("ul.attribute-values input.blocks-input", jQuery(base).last()).each(function(index, elem) { 13884 activeAttributeValues += jQuery(elem).data('attribute-id') + '_' + jQuery(elem).val() + ','; 13885 }); 13886 13887 return { 13888 attribute_values: activeAttributeValues 13889 }; 13890} 13891 13892/** 13893 * Product attributes triggers are inputs and selectors 13894 * of the attribute-values block 13895 * 13896 * @returns {String} 13897 */ 13898function getAttributeValuesTriggers() 13899{ 13900 return 'ul.attribute-values input, ul.attribute-values select'; 13901} 13902 13903function getAttributeValuesShadowWidgets() 13904{ 13905 return '.widget-fingerprint-product-price'; 13906} 13907 13908function bindAttributeValuesTriggers() 13909{ 13910 const handler = function (productId) { 13911 xcart.trigger('update-product-page', productId); 13912 }; 13913 13914 const obj = jQuery("ul.attribute-values").closest('.product-details-info').find('form.product-details'); 13915 if (obj.length > 0) { 13916 const productId = jQuery('input[name="product_id"]', obj).val(); 13917 13918 jQuery("ul.attribute-values input[type='checkbox']").unbind('change').bind('change', function () { handler(productId); }); 13919 jQuery("ul.attribute-values input.blocks-input").unbind('change').bind('change', function () { handler(productId); }); 13920 jQuery("ul.attribute-values select").unbind('change').bind('change', function () { handler(productId); }); 13921 13922 jQuery("ul.attribute-values textarea").each(function(index, elem) { 13923 if (textAttrCache[jQuery(elem).data('attribute-id')]) { 13924 jQuery(elem).val(textAttrCache[jQuery(elem).data('attribute-id')]); 13925 } 13926 }); 13927 } 13928} 13929 13930function BlocksSelector() 13931{ 13932 jQuery('.product-details-info').on( 13933 'click', 13934 '.block-value:not(.selected)', 13935 function () { 13936 const $blockValue = jQuery(this); 13937 const blockValueId = $blockValue.data('value'); 13938 const blockValueName = $blockValue.find('.block-value-name').html(); 13939 const blockValueModifiers = $blockValue.data('modifiers'); 13940 const blocksName = $blockValue.data('name'); 13941 13942 const $blocksSelector = $blockValue.closest('.blocks-selector'); 13943 const $blocksTitle = $blocksSelector.find('.blocks-title'); 13944 const $blocksInput = $blocksSelector.find('.blocks-input'); 13945 13946 $blocksTitle.removeClass('not-selected'); 13947 $blocksInput.val(blockValueId).change(); 13948 $blocksTitle.find('.attr-value-name').html(blockValueName); 13949 $blocksTitle.find('.attr-value-modifiers').html(blockValueModifiers); 13950 13951 unselectAllBlocks(blocksName); 13952 $blockValue.addClass('selected'); 13953 } 13954 ); 13955 13956 let timeout; 13957 let $tooltip; 13958 13959 setTimeout(() => { 13960 jQuery('.product-details-info, .change-attribute-values').on({ 13961 mouseenter: function () { 13962 $tooltip = jQuery(this).find('.unavailable-tooltip'); 13963 timeout = setTimeout(function () { 13964 $tooltip.show(100); 13965 }, 250); 13966 }, 13967 mouseleave: function () { 13968 clearTimeout(timeout); 13969 if ($tooltip !== undefined) { 13970 $tooltip.hide(100); 13971 } 13972 } 13973 }, '.block-value'); 13974 }, 1); 13975} 13976 13977function unselectAllBlocks(blocksName) { 13978 jQuery(`.block-value[data-name="${blocksName}"]`).removeClass('selected'); 13979} 13980 13981xcart.autoload(BlocksSelector);
13982xcart.bind('block.product.details.postprocess', BlocksSelector); 13983xcart.registerWidgetsParamsGetter('update-product-page', getAttributeValuesParams); 13984xcart.registerWidgetsTriggers('update-product-page', getAttributeValuesTriggers); 13985xcart.registerTriggersBind('update-product-page', bindAttributeValuesTriggers); 13986xcart.registerShadowWidgets('update-product-page', getAttributeValuesShadowWidgets); 13987xcart.registerShadowWidgets('update-product-page', function() { 13988 return '.widget-fingerprint-common-attributes'; 13989});; 13990/* AUTOGENERATED: rating.js */ 13991/* vim: set ts=2 sw=2 sts=2 et: */ 13992 13993/** 13994 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 13995 * See https://www.x-cart.com/license-agreement.html for license details. 13996 */ 13997 13998CommonForm.elementControllers.push( 13999 { 14000 pattern: '.button-average-rating', 14001 handler: function () { 14002 jQuery(this) 14003 .click(function() { 14004 jQuery('.product-average-rating-container').toggle(); 14005 }); 14006 } 14007 } 14008); 14009 14010CommonForm.elementControllers.push( 14011 { 14012 pattern: 'div.vote-bar', 14013 handler: function () { 14014 14015 var $tooltip = jQuery(this).closest('div').parent().children('.rating-tooltip'); 14016 var $div = jQuery(this).closest('div'); 14017 14018 var timeout; 14019 14020 $div.hover( 14021 function() { 14022 timeout = setTimeout(function(){ 14023 $tooltip.show(100); 14024 }, 250); 14025 }, 14026 function() { 14027 clearTimeout(timeout); 14028 $tooltip.hide(100); 14029 } 14030 ); 14031 } 14032 } 14033);; 14034/* AUTOGENERATED: script.js */ 14035/* vim: set ts=2 sw=2 sts=2 et: */ 14036 14037/** 14038 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 14039 * See https://www.x-cart.com/license-agreement.html for license details. 14040 */ 14041 14042const Products = function () { 14043 14044 /** 14045 * @param {Element} block 14046 * @param {boolean} isAdded 14047 */ 14048 const setAdded = (block, isAdded) => { 14049 if (block) { 14050 block.classList.toggle('product-added', !!isAdded); 14051 } 14052 }; 14053 14054 /** 14055 * @param {Element} block 14056 * @param {boolean} isLoading 14057 */ 14058 const setLoading = (block, isLoading) => { 14059 if (block) { 14060 block.classList.toggle('qty-update-is-needed', !!isLoading); 14061 } 14062 }; 14063 14064 /** 14065 * @param {number} productId 14066 * @return {NodeListOf<Element>} 14067 */ 14068 this.getProductBlocks = (productId) => { 14069 return document.querySelectorAll('.products-grid .product.productid-' + productId); 14070 }; 14071 14072 /** 14073 * @param {Element} block 14074 * @return {boolean} 14075 */ 14076 this.isLoading = (block) => { 14077 return block && block.classList.contains('qty-update-is-needed'); 14078 }; 14079 14080 /** 14081 * Whether the product is added to cart. 14082 * @param {Element} block 14083 * @return {boolean} 14084 */ 14085 this.isAdded = (block) => { 14086 return block && block.classList.contains('product-added'); 14087 }; 14088 14089 /** 14090 * Get the list of the product buttons (comparison button, wishlist button, etc.) 14091 * @param {Element} block 14092 * @return {NodeListOf<Element>} 14093 */ 14094 this.getButtons = (block) => { 14095 return block ? block.querySelectorAll('.product-photo__button') : []; 14096 }; 14097 14098 /** 14099 * @param {Element} button 14100 * @return {boolean} 14101 */ 14102 this.isButtonLoading = (button) => { 14103 return button && button.classList.contains('product-photo__button--loading'); 14104 }; 14105 14106 /** 14107 * @param {Element} button 14108 * @param {boolean} isLoading 14109 */ 14110 this.setButtonLoading = (button, isLoading) => { 14111 if (button) { 14112 button.classList.toggle('product-photo__button--loading', !!isLoading); 14113 } 14114 }; 14115 14116 /** 14117 * @param {number} productId 14118 * @param {number} newCount 14119 * @param {boolean} isLimit 14120 */ 14121 this.setCount = (productId, newCount, isLimit) => { 14122 newCount = Math.max(0, newCount); 14123 const blocks = this.getProductBlocks(productId); 14124 14125 blocks.forEach(block => { 14126 setLoading(block, false); 14127 setAdded(block, (newCount > 0)); 14128 14129 const countField = block.parentNode.querySelector('.qty-in-cart'); 14130 if (countField) { 14131 countField.value = newCount; 14132 } 14133 14134 block.parentNode.querySelectorAll('.increase-qty-container > button').forEach(btn => { 14135 if (isLimit) { 14136 btn.setAttribute('disabled', 'disabled'); 14137 } else { 14138 btn.removeAttribute('disabled'); 14139 } 14140 }); 14141 14142 }); 14143 }; 14144 14145 this.init = () => { 14146 xcart.bind('updateCart', (e, data) => { 14147 if (data.items) {
14148 data.items.forEach(item => { 14149 if (item.object_id && item.hasOwnProperty('quantity')) { 14150 Products.getInstance().setCount(item.object_id, item.quantity, item.is_limit); 14151 } 14152 }); 14153 } 14154 }); 14155 }; 14156}; 14157 14158Products.prototype.instance = null; 14159 14160Products.getInstance = () => { 14161 if (!Products.prototype.instance) { 14162 Products.prototype.instance = new Products(); 14163 Products.prototype.instance.init(); 14164 } 14165 14166 return Products.prototype.instance; 14167}; 14168 14169Products.getInstance();; 14170/* AUTOGENERATED: close-button.js */ 14171/* vim: set ts=2 sw=2 sts=2 et: */ 14172 14173/** 14174 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 14175 * See https://www.x-cart.com/license-agreement.html for license details. 14176 */ 14177 14178xcart.bind( 14179 'init-close-wishlist', 14180 function () { 14181 jQuery('a.wishlist-close').click(function () { 14182 xcart.trigger('send-close-wishlist', {link: jQuery(this)}); 14183 14184 return false; 14185 }); 14186 } 14187); 14188 14189xcart.bind( 14190 'send-close-wishlist', 14191 _.bind( 14192 function(event, data) { 14193 var link = data.link; 14194 14195 xcart.get( 14196 link.attr('href'), 14197 function () { 14198 jQuery('a.wishlist-close').closest('.items-list')[0].controller.block.load(); 14199 } 14200 ); 14201 }, 14202 this 14203 ) 14204); 14205 14206xcart.bind('list.products.loaded', function (event, data) { 14207 if(data.widgetClass == "QSL\\MyWishlist\\View\\ItemsList\\Product\\Customer\\WishlistPage" 14208 && jQuery(".items-list.wishlist-products .product-cell").length === 0){ 14209 jQuery(".wishlist-container") 14210 .html("<div class='no-wishlist-products'>" + xcart.t("Feel free to add any product you like to your wishlist") + "</div>"); 14211 } 14212}); 14213 14214xcart.bind('loginfirst', function (event, message) { 14215 xcart.trigger('message', {type: 'info', message: message}); 14216}); 14217 14218xcart.bind('productaddedtowishlist', function (event, data) { 14219 jQuery('.product.productid-' + data.productid + ' a.add-to-wishlist').addClass('fa-heart').removeClass('fa-heart-o'); 14220}); 14221 14222jQuery(document).ready(function () { 14223 xcart.microhandlers.add( 14224 'CloseWishlist', 14225 'a.wishlist-close:first', 14226 function () { 14227 xcart.trigger('init-close-wishlist'); 14228 } 14229 ); 14230 14231 xcart.microhandlers.add( 14232 'AddToWishlist', 14233 'a.add-to-wishlist', 14234 function () { 14235 var $this = jQuery(this); 14236 $this.click(function () { 14237 14238 if ($this.hasClass('log-in')) { 14239 return false; 14240 } 14241 14242 var urlData = { 14243 target : 'wishlist', 14244 action : 'add_to_wishlist', 14245 list : 1, 14246 product_id: $this.data('productid') 14247 }; 14248 14249 xcart.post( 14250 URLHandler.buildURL(urlData), 14251 function (XMLHttpRequest, textStatus, data, isValidXML) { 14252 } 14253 ); 14254 14255 return false; 14256 }); 14257 } 14258 ); 14259});; 14260/* AUTOGENERATED: products_list.js */ 14261/* vim: set ts=2 sw=2 sts=2 et: */ 14262 14263/** 14264 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 14265 * See https://www.x-cart.com/license-agreement.html for license details. 14266 */ 14267 14268decorate( 14269 'ProductsListView',
14270 'addToCartRequestParams', 14271 function (elem) { 14272 var params = arguments.callee.previousMethod.apply(this, arguments); 14273 14274 var ecData = jQuery('*[data-ga-ec-action]', elem.closest('.add-to-cart-button')); 14275 if (!_.isUndefined(ecData) && ecData.length !== 0) { 14276 var context = ecData.data('ga-ec-action').context; 14277 14278 if (!_.isUndefined(context.list)) { 14279 params.ga_list = context.list; 14280 } 14281 } 14282 14283 return params; 14284 } 14285); 14286 14287decorate( 14288 'ProductsListView', 14289 'openQuickLookParams', 14290 function (elem) { 14291 var params = arguments.callee.previousMethod.apply(this, arguments); 14292 14293 var ecData = jQuery('*[data-ga-ec-action]', elem); 14294 if (!_.isUndefined(ecData) && ecData.length !== 0) { 14295 var context = ecData.data('ga-ec-action').context; 14296 14297 if (!_.isUndefined(context.list)) { 14298 params.ga_list = context.list; 14299 } 14300 } 14301 14302 return params; 14303 } 14304);; 14305/* AUTOGENERATED: product_list_popup.js */ 14306/* vim: set ts=2 sw=2 sts=2 et: */ 14307 14308/** 14309 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 14310 * See https://www.x-cart.com/license-agreement.html for license details. 14311 */ 14312 14313document.addEventListener('DOMContentLoaded', function () { 14314 const processor = new AddToCartPopupProcessor() 14315 processor.processAddToCartButtons() 14316}) 14317 14318function AddToCartPopupProcessor () { 14319 this.bindEvents() 14320 this.isPopupDynamicallyClosedForever = false 14321} 14322 14323AddToCartPopupProcessor.prototype.bindEvents = function () { 14324 xcart.bind('list.products.loaded', (event) => { 14325 this.processAddToCartButtons() 14326 }) 14327} 14328 14329AddToCartPopupProcessor.prototype.processAddToCartButtons = function () { 14330 const _this = this 14331 14332 decorate( 14333 'ProductsListView', 14334 'postprocess', 14335 function (isSuccess, initial) { 14336 document.querySelectorAll('.add-to-cart, .increase-qty').forEach((item) => { 14337 if (_this.isNeedOpenPopup(item)) { 14338 14339 item.addEventListener('click', (event) => { 14340 if (_this.isPopupDynamicallyClosedForever) { 14341 return 14342 } 14343 14344 event.stopImmediatePropagation() 14345 14346 const conditionData = _this.getPopupListConditionData(item) 14347 const productWrapper = _this.getProductWrapper(item) 14348 const productId = xcart.getValueFromClass(productWrapper, 'productid') ?? '' 14349 const showDoesntFitPopup = !conditionData.isEmptyAuto 14350 14351 if (conditionData.forceProductOptionSelected) { 14352 window.location.assign(productWrapper.querySelector('.url').getAttribute('href')) 14353 } else { 14354 _this.openPopup(productId, showDoesntFitPopup); 14355 14356 const $item = $(item); 14357 14358 if ($item.is('.add-to-cart')) { 14359 // Mark only last clicked button as last-clicked 14360 $('.add-to-cart').removeClass('last-clicked'); 14361 $item.addClass('last-clicked'); 14362 } 14363 } 14364 }) 14365 } 14366 }) 14367 14368 arguments.callee.previousMethod.apply(this, arguments) 14369 } 14370 ) 14371 14372 xcart.bind('selected_popup_close_forever', function () { 14373 _this.isPopupDynamicallyClosedForever = true 14374 }) 14375} 14376 14377AddToCartPopupProcessor.prototype.isNeedOpenPopup = function (addToCartElement) { 14378 const popupConditionData = this.getPopupListConditionData(addToCartElement) 14379 if (!popupConditionData) { 14380 return false 14381 } 14382 14383 const isPopupClosedForever = this.isPopupDynamicallyClosedForever || popupConditionData.isClosePopupForever 14384 14385 return ((popupConditionData.isEmptyAuto && popupConditionData.isVehicleSpecific) || 14386 (!popupConditionData.isFitVehicle && popupConditionData.isPopupOpened === null)) && !isPopupClosedForever 14387} 14388 14389AddToCartPopupProcessor.prototype.openPopup = function (productId, showDoesntFitPopup) { 14390 popup.load(URLHandler.buildURL({ 14391 widget: 'QSL\\Make\\View\\SelectMMYSPopup\\SelectMMYSPopupWithReloadPage', 14392 target: 'add_vehicle', 14393 productId: productId, 14394 showCloseButton: true, 14395 showDoesntFitPopup: showDoesntFitPopup, 14396 isListPage: true, 14397 source: "addToCart" 14398 })) 14399} 14400 14401AddToCartPopupProcessor.prototype.getProductWrapper = function (addToCartElement) { 14402 return addToCartElement.closest('.product') ? 14403 addToCartElement.closest('.product') : 14404 addToCartElement.closest('.box-product').querySelector('.product') 14405} 14406 14407AddToCartPopupProcessor.prototype.getPopupListConditionData = function (addToCartElement) { 14408 const productWrapper = this.getProductWrapper(addToCartElement) 14409 14410 const popupConditionData = productWrapper 14411 ?.querySelector('.select_vehicle_on_specific_product') 14412 ?.getAttribute('data') 14413 14414 if (!popupConditionData) { 14415 return null 14416 } 14417 14418 return JSON.parse(popupConditionData) 14419}; 14420/* AUTOGENERATED: add-to-compare.js */ 14421/* vim: set ts=2 sw=2 sts=2 et: */ 14422 14423/** 14424 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 14425 * See https://www.x-cart.com/license-agreement.html for license details. 14426 */ 14427 14428if (!Products) { 14429 window.Products = {}; 14430} 14431 14432Products.prototype.setComparison = (productId, isAddedToComparison) => {
14433 Products.getInstance().getProductBlocks(productId).forEach(block => { 14434 block.querySelectorAll('.compare-checkbox').forEach(checkbox => { 14435 checkbox.classList.toggle('compare-checkbox--added', !!isAddedToComparison); 14436 checkbox.checked = !!isAddedToComparison; 14437 }); 14438 }); 14439}; 14440 14441Products.prototype.setComparisonButtonsLoading = (productId, isLoading) => { 14442 Products.getInstance().getProductBlocks(productId).forEach(block => { 14443 block.querySelectorAll('.compare-checkbox').forEach(check => { 14444 Products.getInstance().setButtonLoading(check, isLoading); 14445 }); 14446 }); 14447}; 14448 14449xcart.microhandlers.add( 14450 'CompareCheck', 14451 '.compare-check:not(.handled)', 14452 function () { 14453 this.addEventListener('change', () => { 14454 Products.getInstance().setComparisonButtonsLoading(this.getAttribute('data-id'), true); 14455 }); 14456 this.classList.add('handled'); 14457 } 14458); 14459 14460xcart.bind('updateProductComparison', (e, data) => { 14461 if (data && data.productId) { 14462 Products.getInstance().setComparisonButtonsLoading(data.productId, false); 14463 Products.getInstance().setComparison(data.productId, (data.action === 'add')); 14464 } 14465});; 14466/* AUTOGENERATED: wholesale_product_page.js */ 14467/* vim: set ts=2 sw=2 sts=2 et: */ 14468 14469/** 14470 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 14471 * See https://www.x-cart.com/license-agreement.html for license details. 14472 */ 14473 14474function getWholesaleParams(product) 14475{ 14476 var base = jQuery('.product-info-' + product.product_id); 14477 14478 return { 14479 quantity: jQuery(".product-qty input[type='number']", base).val() 14480 }; 14481} 14482 14483function getWholesaleTriggers() 14484{ 14485 return ".product-qty input[type='text']"; 14486} 14487 14488function getWholesaleShadowWidgets() 14489{ 14490 return '.widget-fingerprint-product-price'; 14491} 14492 14493function bindWholesaleTriggers() 14494{ 14495 var handler = function (productId, qty) { 14496 xcart.trigger('update-product-page', productId); 14497 }; 14498 14499 var timer; 14500 var forms = jQuery(".product-qty.wholesale-price-defined input[type='number']").closest('form'); 14501 14502 if (forms) { 14503 forms.each(function(id, obj) { 14504 var productId = jQuery('input[name="product_id"]', obj).val(); 14505 before_handler(obj, timer, handler, productId); 14506 }); 14507 } 14508} 14509 14510function before_handler(obj, timer, handler, productId) { 14511 jQuery(".product-qty.wholesale-price-defined input[type='number']", obj) 14512 .one( 14513 'input', 14514 function (event) { 14515 clearTimeout(timer); 14516 timer = setTimeout( 14517 function () { 14518 var ctrl = event.currentTarget.commonController; 14519 if (ctrl.isChanged() && ctrl.validate(true)) { 14520 ctrl.saveValue(); 14521 handler(productId); 14522 } else { 14523 before_handler(obj, timer, handler, productId); 14524 } 14525 }, 14526 2000 14527 ); 14528 }); 14529} 14530 14531xcart.registerWidgetsParamsGetter('update-product-page', getWholesaleParams); 14532xcart.registerWidgetsTriggers('update-product-page', getWholesaleTriggers); 14533xcart.registerTriggersBind('update-product-page', bindWholesaleTriggers); 14534xcart.registerShadowWidgets('update-product-page', getWholesaleShadowWidgets); 14535xcart.registerShadowWidgets('update-product-page', function(){ 14536 return '.widget-fingerprint-product-wholesale-prices'; 14537}); 14538xcart.registerShadowWidgets('update-product-page', function(){ 14539 return '.widget-fingerprint-wholesale-quantity'; 14540});; 14541/* AUTOGENERATED: add-to-wishlist.js */ 14542/* vim: set ts=2 sw=2 sts=2 et: */ 14543 14544/** 14545 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 14546 * See https://www.x-cart.com/license-agreement.html for license details. 14547 */ 14548 14549Products.prototype.setAddedToWishlist = (productId, isAddedToWishlist) => { 14550 Products.getInstance().getProductBlocks(productId).forEach(block => { 14551 block.querySelectorAll('.add-to-wishlist__wrapper').forEach(wrapper => { 14552 wrapper.classList.toggle('add-to-wishlist__wrapper--added', !!isAddedToWishlist); 14553 }); 14554 }); 14555}; 14556 14557Products.prototype.setWishlistButtonsLoading = (productId, isLoading) => { 14558 Products.getInstance().getProductBlocks(productId).forEach(block => { 14559 block.querySelectorAll('.add-to-wishlist__wrapper').forEach(link => { 14560 Products.getInstance().setButtonLoading(link, isLoading); 14561 }); 14562 }); 14563}; 14564 14565xcart.microhandlers.add( 14566 'AddToWishlistInit',
14567 'a.add-to-wishlist:not(.handled)', 14568 function () { 14569 this.addEventListener('click', () => { 14570 if (this.classList.contains('must-be-logged-in') && this.classList.contains('log-in')) { 14571 const loginButton = document.querySelector('.account-links__list-item--login button'); 14572 if (loginButton) { 14573 loginButton.click(); 14574 } 14575 } else { 14576 Products.getInstance().setWishlistButtonsLoading(this.getAttribute('data-productid'), true); 14577 } 14578 }); 14579 14580 this.classList.add('handled'); 14581 } 14582); 14583 14584 14585xcart.bind('productAddedToWishlist', function (event, data) { 14586 if (data && data.productid) { 14587 Products.getInstance().setWishlistButtonsLoading(data.productid, false); 14588 Products.getInstance().setAddedToWishlist(data.productid, true); 14589 } 14590}); 14591 14592 14593xcart.microhandlers.add( 14594 'close-wishlist-link-handler', 14595 '.wishlist-close', 14596 function () { 14597 this.addEventListener('click', () => { 14598 this.parentNode.classList.add('product-photo__button--loading'); 14599 }); 14600 } 14601);; 14602/* AUTOGENERATED: script.js */ 14603/* vim: set ts=2 sw=2 sts=2 et: */ 14604 14605/** 14606 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 14607 * See https://www.x-cart.com/license-agreement.html for license details. 14608 */ 14609 14610const BottomMenu = function () { 14611 let buttons = []; 14612 14613 const ACTIVE_CSS_CLASS = 'bottom-panel__button--active'; 14614 14615 /** 14616 * Add a button to the bottom panel. 14617 * 14618 * @param {Element} btnDomRoot Button DOM root node. 14619 * @param {object} [options] Options. Possible object keys: 'onActivate', 'onDeactivate', 'onToggle', 'onClick', 14620 * 'toggleable'. 14621 */ 14622 this.addButton = (btnDomRoot, options) => { 14623 if (btnDomRoot) { 14624 options = Object.assign({ 14625 onActivate: null, 14626 onDeactivate: null, 14627 onToggle: null, 14628 onClick: null, 14629 toggleable: true 14630 }, options); 14631 14632 options.domRoot = btnDomRoot; 14633 14634 if (options.onClick) { 14635 btnDomRoot.addEventListener('click', options.onClick); 14636 } 14637 14638 btnDomRoot.addEventListener('click', () => { 14639 if (this.isButtonToggleable(btnDomRoot)) { 14640 this.toggleButton(btnDomRoot); 14641 } 14642 }); 14643 14644 buttons.push(options); 14645 } 14646 }; 14647 14648 /** 14649 * @param {Element|object} button An instance of the inner button object or a button's root DOM node. 14650 * @return {boolean} 14651 */ 14652 this.isButtonActive = (button) => { 14653 const btn = this.findButton(button); 14654 14655 return btn && btn.domRoot.classList.contains(ACTIVE_CSS_CLASS); 14656 }; 14657 14658 /** 14659 * @param {Element|object} button An instance of the inner button object or a button's root DOM node. 14660 * @return {boolean} 14661 */ 14662 this.isButtonToggleable = (button) => { 14663 const btn = this.findButton(button); 14664 14665 if (btn) { 14666 const result = (typeof btn.toggleable === 'function') 14667 ? btn.toggleable() 14668 : btn.toggleable; 14669 14670 return !!result; 14671 } 14672 14673 return false; 14674 }; 14675 14676 /** 14677 * @return Array<Element> 14678 */ 14679 this.getActiveButtons = () => { 14680 let result = []; 14681 14682 buttons.forEach(btn => { 14683 if (this.isButtonActive(btn)) { 14684 result.push(btn.domRoot); 14685 } 14686 }); 14687 14688 return result; 14689 }; 14690 14691 /** 14692 * Find a button by its root DOM node. 14693 * 14694 * @param {Element|object} button An instance of the inner button object or a button's root DOM node. 14695 * @return {object|null} 14696 */ 14697 this.findButton = (button) => { 14698 let result = null; 14699 14700 if (button) { 14701 buttons.forEach(btn => { 14702 if ( 14703 (button.domRoot && button === btn) 14704 || btn.domRoot === button 14705 ) { 14706 result = btn; 14707 } 14708 }); 14709 } 14710 14711 return result; 14712 }; 14713 14714 /** 14715 * @param {Element|object} button An instance of the inner button object or a button's root DOM node. 14716 */ 14717 this.deactivateButton = (button) => { 14718 const btn = this.findButton(button); 14719 14720 if (btn && this.isButtonActive(btn)) { 14721 btn.domRoot.classList.remove(ACTIVE_CSS_CLASS); 14722 14723 if (btn.onToggle) { 14724 btn.onToggle(false); 14725 } 14726 if (btn.onDeactivate) { 14727 btn.onDeactivate(); 14728 } 14729 14730 xcart.trigger('bottom-panel-button-state-deactivated', {button: btn.domRoot}); 14731 xcart.trigger('bottom-panel-button-state-change', {button: btn.domRoot, state: false}); 14732 if (document.activeElement === btn.domRoot) { 14733 btn.domRoot.blur(); 14734 } 14735 } 14736 }; 14737 14738 /** 14739 * @param {Element|object} button An instance of the inner button object or a button's root DOM node. 14740 */ 14741 this.activateButton = (button) => { 14742 const btn = this.findButton(button); 14743 14744 if (btn && !this.isButtonActive(btn)) { 14745 buttons.forEach(aBtn => { 14746 if (aBtn !== btn) { 14747 this.deactivateButton(aBtn); 14748 } 14749 }); 14750 14751 const mobileSearchBackButton = document.querySelector('#mobile_search .simple-search__back'); 14752 if (mobileSearchBackButton) { 14753 const rect = mobileSearchBackButton.getBoundingClientRect(); 14754 14755 if (rect.width > 0 && rect.height > 0) { 14756 mobileSearchBackButton.click(); 14757 } 14758 } 14759 14760 btn.domRoot.classList.add(ACTIVE_CSS_CLASS); 14761 if (btn.onToggle) { 14762 btn.onToggle(true); 14763 } 14764 if (btn.onActivate) { 14765 btn.onActivate(); 14766 } 14767 14768 xcart.trigger('bottom-panel-button-state-activated', {button: btn.domRoot}); 14769 xcart.trigger('bottom-panel-button-state-change', {button: btn.domRoot, state: true}); 14770 } 14771 }; 14772 14773 this.toggleButton = (button) => { 14774 button = this.findButton(button); 14775 14776 if (button) { 14777 if (this.isButtonActive(button)) { 14778 this.deactivateButton(button); 14779 } else { 14780 this.activateButton(button); 14781 } 14782 } 14783 }; 14784 14785 /** 14786 * @param {Element|object} button An instance of the inner button object or a button's root DOM node. 14787 * @param {string} badge Badge inner HTML. 14788 */ 14789 this.setItemBadge = (button, badge) => { 14790 const btn = this.findButton(button); 14791 if (btn) { 14792 let badgeDom = btn.domRoot.querySelector('.bottom-panel__button-badge'); 14793 14794 if (!badge && badgeDom) { 14795 badgeDom.parentNode.removeChild(badgeDom); 14796 } else if (badge) { 14797 if (!badgeDom) { 14798 badgeDom = document.createElement('SPAN'); 14799 badgeDom.className = 'badge bottom-panel__button-badge'; 14800 14801 const icon = btn.domRoot.querySelector('.bottom-panel__button-icon'); 14802 if (icon) { 14803 icon.insertBefore(badgeDom, icon.firstElementChild); 14804 } 14805 } 14806 badgeDom.innerHTML = badge; 14807 } 14808 } 14809 }; 14810 14811 /** 14812 * @param {Element|object} button An instance of the inner button object or a button's root DOM node. 14813 * @param {object} options New button options. Possible object keys: 'onActivate', 'onDeactivate', 'onToggle', 14814 * 'onClick', 'toggleable'. 14815 * @return {boolean} True if options are successfully updated, false otherwise (i.e. button has not found). 14816 */ 14817 this.setOptions = (button, options) => { 14818 button = this.findButton(button); 14819 14820 if (button) { 14821 for (let i = 0; i < buttons.length; i++) { 14822 if (buttons[i] === button) { 14823 if (options.onClick) { 14824 buttons[i].domRoot.removeEventListener('click', options.onClick); 14825 } 14826 14827 buttons[i] = Object.assign(buttons[i], options); 14828 14829 return true; 14830 } 14831 } 14832 } 14833 14834 return false;
14835 }; 14836 14837 this.init = () => { 14838 14839 const homeButton = document.querySelector('.bottom-panel__button--home'); 14840 if (homeButton && !homeButton.hasAttribute('href')) { 14841 this.addButton( 14842 homeButton, 14843 { 14844 toggleable: () => !this.isButtonActive(homeButton) 14845 } 14846 ); 14847 14848 xcart.bind('bottom-panel-button-state-deactivated', (e, data) => { 14849 /* 14850 * We need this because during the button activation process, all the active buttons are deactivated first. 14851 * So, the event is fired when the last active button has been deactivated but the one that will be activated 14852 * has not been activated yet. In this case, it will be assumed that there is no active buttons on the panel, so 14853 * the home button will be activated. And then one more button will also be activated, making it two active 14854 * buttons at the same time in the bottom panel. To avoid it, we postpone the check for the active buttons count 14855 * until the next frame. 14856 */ 14857 requestAnimationFrame(() => { 14858 if ( 14859 (!data.button || data.button !== homeButton) 14860 && BottomMenu.getInstance().getActiveButtons().length === 0 14861 ) { 14862 BottomMenu.getInstance().activateButton(homeButton); 14863 } 14864 }); 14865 14866 homeButton.addEventListener('click', () => { 14867 xcart.dropdown.close(); 14868 MobileMenu.getInstance().close(); 14869 }); 14870 }); 14871 14872 xcart.bind('mobile-menu.opened', () => { 14873 BottomMenu.getInstance().activateButton(homeButton); 14874 }); 14875 } 14876 14877 const catalogButton = document.querySelector('.bottom-panel__button--catalog'); 14878 const mobileCatalog = document.querySelector('.mobile-menu__categories-list'); 14879 if (catalogButton && mobileCatalog) { 14880 this.addButton( 14881 catalogButton, 14882 { 14883 onActivate: () => { 14884 xcart.dropdown.open(mobileCatalog); 14885 }, 14886 onDeactivate: () => { 14887 xcart.dropdown.close(mobileCatalog); 14888 MobileCatalog.getInstance().closeAll(); 14889 }, 14890 toggleable: () => !this.isButtonActive(catalogButton) 14891 } 14892 ); 14893 } 14894 14895 const cartButton = document.querySelector('.bottom-panel__button--cart'); 14896 if (cartButton) { 14897 const isLink = cartButton.tagName.toLowerCase() === 'a'; 14898 let params = { 14899 toggleable: () => ( 14900 !isLink 14901 && (!this.isButtonActive(cartButton) || xcart.getTarget() === 'cart') 14902 ) 14903 }; 14904 14905 if (!isLink) { 14906 if (xcart.getTarget() === 'cart') { 14907 cartButton.addEventListener('click', () => { 14908 xcart.dropdown.close(); 14909 MobileMenu.getInstance().close(); 14910 }); 14911 } else { 14912 params.onActivate = () => { 14913 xcart.dropdown.open('.lc-minicart'); 14914 }; 14915 14916 params.onDeactivate = () => { 14917 xcart.dropdown.close('.lc-minicart'); 14918 }; 14919 } 14920 } 14921 14922 this.addButton(cartButton, params); 14923 14924 xcart.bind('updateCart', (e, data) => { 14925 if (typeof (data.itemsCount) !== 'undefined') { 14926 this.setItemBadge(cartButton, (data.itemsCount <= 9 ? data.itemsCount : '9+')); 14927 } 14928 }); 14929 } 14930 14931 const accountButton = document.querySelector('.bottom-panel__button--account'); 14932 const accountMenu = document.querySelector('.dropdown--account'); 14933 if (accountButton && accountMenu) { 14934 this.addButton( 14935 accountButton, 14936 { 14937 onActivate: () => { 14938 xcart.dropdown.open(accountMenu); 14939 }, 14940 onDeactivate: () => { 14941 xcart.dropdown.close(accountMenu); 14942 }, 14943 toggleable: () => !this.isButtonActive(accountButton) 14944 } 14945 ); 14946 14947 accountButton.addEventListener('click', () => { 14948 if (!xcart.dropdown.isOpened(accountMenu)) { 14949 xcart.dropdown.open(accountMenu); 14950 } 14951 }); 14952 } 14953 }; 14954}; 14955 14956BottomMenu.prototype.instance = null; 14957 14958BottomMenu.getInstance = () => { 14959 if (!BottomMenu.prototype.instance) { 14960 BottomMenu.prototype.instance = new BottomMenu(); 14961 BottomMenu.prototype.instance.init(); 14962 } 14963 14964 return BottomMenu.prototype.instance; 14965}; 14966 14967BottomMenu.getInstance();;
14968/* AUTOGENERATED: catalog.js */ 14969/* vim: set ts=2 sw=2 sts=2 et: */ 14970 14971/** 14972 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 14973 * See https://www.x-cart.com/license-agreement.html for license details. 14974 */ 14975 14976xcart.microhandlers.add( 14977 'MobileCatalogAjaxLoad', 14978 '.bottom-panel__button--catalog[data-ajax-category-id]:not([data-ajax-handled])', 14979 function () { 14980 this.addEventListener('click', () => { 14981 const mobileCatalogContainer = document.querySelector('.mobile-menu__categories-list > .dropdown-menu'); 14982 14983 if ( 14984 !mobileCatalogContainer.querySelector('.mobile-menu__categories') 14985 && !mobileCatalogContainer.querySelector('.top-menu__categories-item--loader') 14986 ) { 14987 const ajaxCategories = AjaxCategories.getInstance(); 14988 14989 ajaxCategories.setLoadingState(mobileCatalogContainer, 'DIV'); 14990 14991 ajaxCategories.loadSubcategories( 14992 parseInt(this.getAttribute('data-ajax-category-id')), 14993 0, 14994 'mobile', 14995 (data) => { 14996 ajaxCategories.unsetLoadingState(mobileCatalogContainer); 14997 this.removeAttribute('data-ajax-category'); 14998 14999 xcart.createDOMTreeFromHTML(data).querySelectorAll('.mobile-menu__categories').forEach( 15000 child => { 15001 mobileCatalogContainer.appendChild(child); 15002 } 15003 ); 15004 15005 MobileCatalog.getInstance().updateMobileMenuList(); 15006 MobileCatalog.getInstance().updateHandlers(); 15007 15008 ajaxCategories.init(); 15009 } 15010 ); 15011 } 15012 }); 15013 15014 this.setAttribute('data-ajax-handled', 'true'); 15015 } 15016);; 15017/* AUTOGENERATED: garage.js */ 15018/* vim: set ts=2 sw=2 sts=2 et: */ 15019 15020/** 15021 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 15022 * See https://www.x-cart.com/license-agreement.html for license details. 15023 */ 15024 15025(() => { 15026 const garageBlock = document.getElementById('my-garage'); 15027 const garageBtn = document.querySelector('.bottom-panel__button--garage'); 15028 15029 if (garageBtn) { 15030 const bottomMenu = BottomMenu.getInstance(); 15031 15032 bottomMenu.addButton( 15033 garageBtn, 15034 { 15035 onActivate: () => { 15036 xcart.dropdown.open(garageBlock); 15037 }, 15038 onDeactivate: () => { 15039 xcart.dropdown.close(garageBlock); 15040 }, 15041 toggleable: () => !BottomMenu.getInstance().isButtonActive(garageBtn) 15042 } 15043 ); 15044 15045 xcart.bind('mobile-menu.opened', () => { 15046 bottomMenu.deactivateButton(garageBtn); 15047 }); 15048 } 15049})();; 15050/* AUTOGENERATED: subscribe.js */ 15051/* vim: set ts=2 sw=2 sts=2 et: */ 15052 15053/** 15054 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 15055 * See https://www.x-cart.com/license-agreement.html for license details. 15056 */ 15057 15058function SubscribeBlockView(base) 15059{ 15060 var args = Array.prototype.slice.call(arguments, 0); 15061 this.callSupermethod('constructor', args); 15062 var s = this; 15063 xcart.bind('changeSuccessMessage', function (event, data) { 15064 if (data && typeof data.message !== 'undefined') { 15065 s.changeSuccessMessage(data.message) 15066 } 15067 }); 15068 15069 // Form 15070 var form = this.base 15071 ? this.base.find('.subscription-form-block form').get(0) 15072 : null; 15073 if (form) { 15074 form.commonController.enableBackgroundSubmit( 15075 undefined, 15076 _.bind( 15077 function(event, result){ 15078 if (result.isValid && result.textStatus === 'success') { 15079 this.processSuccess(); 15080 } else { 15081 this.processError(); 15082 } 15083 }, 15084 this 15085 ) 15086 ); 15087 } 15088} 15089 15090extend(SubscribeBlockView, ALoadable); 15091 15092SubscribeBlockView.autoload = function() 15093{ 15094 jQuery('.subscription-block').each( 15095 function() { 15096 new SubscribeBlockView(this); 15097 } 15098 ); 15099}; 15100 15101// Widget target 15102SubscribeBlockView.prototype.widgetTarget = 'newsletter_subscriptions'; 15103 15104// Widget class name 15105SubscribeBlockView.prototype.widgetClass = '\\XC\\NewsletterSubscriptions\\View\\SubscribeBlock'; 15106 15107SubscribeBlockView.prototype.processSuccess = function() 15108{ 15109 this.base.find('.subscription-form-block').hide(); 15110 15111 this.base.find('.subscription-error-block').hide(); 15112 15113 this.base.find('.subscription-success-block').removeClass('hidden'); 15114 this.base.find('.subscription-success-block').show(); 15115} 15116 15117SubscribeBlockView.prototype.processError = function() 15118{ 15119 this.base.find('.subscription-error-block').removeClass('hidden'); 15120 this.base.find('.subscription-error-block').show(); 15121} 15122 15123// Get event namespace (prefix) 15124SubscribeBlockView.prototype.getEventNamespace = function() 15125{ 15126 return 'NewsletterSubscriptions'; 15127} 15128 15129SubscribeBlockView.prototype.changeSuccessMessage = function (message) { 15130 this.base.find('.subscription-success-block').html(message) 15131} 15132 15133xcart.autoload(SubscribeBlockView);; 15134/* AUTOGENERATED: jquery_footer.js */ 15135/* vim: set ts=2 sw=2 sts=2 et: */ 15136 15137/** 15138 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 15139 * See https://www.x-cart.com/license-agreement.html for license details. 15140 */ 15141 15142// function footer () { 15143// var fh = jQuery('#footer-area').height(); 15144// if (fh > 150) { 15145// jQuery('#page').css('padding-bottom', fh); 15146// } 15147// } 15148 15149function mobileDropdown () { 15150 if (jQuery('#top-menu.dropdown-menu').hasClass('scrollable') == true) { 15151 jQuery('#top-menu.dropdown-menu').removeClass('scrollable').removeAttr('style'); 15152 } 15153 var h1 = jQuery(window).height(); 15154 var h2 = jQuery('#top-menu.dropdown-menu').height(); 15155 var h3 = jQuery('.mobile_header ul.nav-pills').height(); 15156 if (h1 < h2+h3) { 15157 jQuery('#top-menu.dropdown-menu').addClass('scrollable').height(h1-h3); 15158 } 15159} 15160 15161jQuery(function () { 15162 mobileDropdown(); 15163 jQuery(window).resize(mobileDropdown); 15164 jQuery(function () {
15165 jQuery('.top-main-menu a, .top-main-menu .primary-title').on('touchstart', function (e) { 15166 if (jQuery(this).hasClass('tap') !== true && jQuery(this).parent().parent().hasClass('tap') !== true) { 15167 jQuery('ul.tap, a.tap, .primary-title.tap').removeClass('tap'); 15168 } 15169 if (jQuery(this).next('ul').length !== 0) { 15170 jQuery(this).toggleClass('tap'); 15171 if (jQuery(this).hasClass('tap') == true) { 15172 e.preventDefault(); 15173 } 15174 jQuery(this).next('ul').toggleClass('tap'); 15175 } 15176 jQuery(document).on('touchstart', function (e) { 15177 if (jQuery(e.target).closest('.tap').length == 0) { 15178 jQuery('ul.tap, a.tap, .primary-title.tap').removeClass('tap'); 15179 } 15180 }); 15181 }); 15182 }); 15183});; 15184/* AUTOGENERATED: header-widget-common.js */ 15185/* vim: set ts=2 sw=2 sts=2 et: */ 15186 15187/** 15188 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 15189 * See https://www.x-cart.com/license-agreement.html for license details. 15190 */ 15191 15192var wishlistUpdateCountHandler = function (event, data) { 15193 var count = data.count; 15194 var count_container = $('.wishlist-product-count'); 15195 var heart = count_container.siblings('i'); 15196 var old_count = parseInt(count_container.eq(0).text())? parseInt(count_container.eq(0).text()) : 0; 15197 15198 var settings_icon = $('.header_settings'); 15199 var mobile_slidebar_icon = $('.mobile_header-slidebar'); 15200 15201 var indicator = [settings_icon, mobile_slidebar_icon]; 15202 15203 15204 // Change indication 15205 15206 indicator.forEach(function (entry) { 15207 if (count > old_count && !entry.hasClass('recently-updated')) { 15208 entry.addClass('recently-updated'); 15209 } 15210 }); 15211 15212 // Change items count 15213 15214 count_container.html(count); 15215 15216 if (count == 0) { 15217 heart.removeClass('fa-heart-o fa-heart').addClass('fa-heart-o'); 15218 } else { 15219 heart.removeClass('fa-heart-o fa-heart').addClass('fa-heart'); 15220 } 15221 15222 15223}; 15224 15225// Reload on event. it is used when we create profile during wishlist adding 15226xcart.bind('doreloadpage', function () { 15227 self.location.reload(); 15228}); 15229 15230xcart.bind('updateWishlistProductsCount', wishlistUpdateCountHandler); 15231 15232xcart.bind('popup.open', function () { 15233 xcart.autoload(PopupButton); 15234});; 15235/* AUTOGENERATED: ga-core.js */ 15236/* vim: set ts=2 sw=2 sts=2 et: */ 15237 15238/** 15239 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 15240 * See https://www.x-cart.com/license-agreement.html for license details. 15241 */ 15242 15243define('googleAnalytics/base/core', ['js/underscore'], function(_) { 15244 return Object.extend({ 15245 15246 settings: { 15247 sendPageview: true, 15248 currency: 'USD' 15249 }, 15250 15251 constructor: function () { 15252 let $initScript = jQuery('#ga-init-script') 15253 if ($initScript.length) { 15254 this.settings = _.defaults( 15255 $initScript.data('settings'), 15256 this.settings 15257 ) 15258 } 15259 15260 this.initialize() 15261 }, 15262 15263 getSetting (name) { 15264 return this.settings[name] 15265 }, 15266 15267 initialize () { 15268 if (this.settings.sendPageview) { 15269 jQuery().ready(_.bind(this.sendPageViewInit, this)) 15270 } 15271 }, 15272 15273 sendPageViewInit () { 15274 }, 15275 15276 registerPageView () { 15277 }, 15278 15279 registerEvent () { 15280 }, 15281 15282 isAvailable () { 15283 } 15284 }); 15285});; 15286/* AUTOGENERATED: ga-event.js */ 15287/* vim: set ts=2 sw=2 sts=2 et: */ 15288 15289/** 15290 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 15291 * See https://www.x-cart.com/license-agreement.html for license details. 15292 */ 15293 15294define('googleAnalytics/event', [ 'googleAnalytics/core', 'js/underscore' ], function(GACore, _) { 15295 return Object.extend({ 15296 constructor: function () { 15297 this.coreInstance = GACore.instance 15298 15299 this.initialize() 15300 }, 15301 15302 initialize() { 15303 jQuery().ready(_.bind(function () { 15304 this.executeIsBecomesAvailable(this.processReady, 10, 100); 15305 }, this)); 15306 15307 this.bindListeners() 15308 }, 15309 15310 bindListeners () { 15311 _.each( 15312 this.getListeners(), 15313 _.bind( 15314 function (handler, eventName) { 15315 xcart.bind(eventName, _.bind(function (event, params) { 15316 const callback = _.partial(handler, event, params) 15317 this.executeIsBecomesAvailable(callback, 10, 100); 15318 }, this)) 15319 }, 15320 this 15321 ) 15322 ) 15323 }, 15324 15325 executeIsBecomesAvailable(callback, count, delay) { 15326 if (!this.coreInstance.isAvailable()) { 15327 if (count > 0) { 15328 console.log('XCart-GA: waiting for GA', count, this); 15329 _.delay(_.partial(_.bind(this.executeIsBecomesAvailable, this), c
15329allback, count - 1, delay), delay); 15330 } else { 15331 console.warn('XCart-GA: GA not available', callback, this); 15332 callback.apply(this); 15333 } 15334 15335 return; 15336 } 15337 15338 callback.apply(this); 15339 }, 15340 15341 createFunctionWithTimeout (callback, args, opt_timeout) { 15342 var called = false 15343 15344 function fn () { 15345 if (!called) { 15346 called = true 15347 callback(args) 15348 } 15349 } 15350 15351 setTimeout(fn, opt_timeout || 500) 15352 return fn 15353 }, 15354 15355 getListeners () { 15356 return {} 15357 }, 15358 15359 processReady () { 15360 }, 15361 15362 sendPageView () { 15363 this.coreInstance.registerPageView() 15364 }, 15365 15366 sendEvent (name, label, value, namespace) { 15367 this.coreInstance.registerEvent(namespace || this.namespace, name, label, value) 15368 } 15369 }); 15370});; 15371/* AUTOGENERATED: ga-core.js */ 15372/* vim: set ts=2 sw=2 sts=2 et: */ 15373 15374/** 15375 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 15376 * See https://www.x-cart.com/license-agreement.html for license details. 15377 */ 15378 15379define('googleAnalytics/core', ['googleAnalytics/base/core', 'googleAnalytics/mapper', 'js/underscore'], function(GACoreBase, GAMapper, _) { 15380 let GACore = GACoreBase.extend({ 15381 15382 sendPageViewInit () {
15383 GACore.superclass.sendPageViewInit.apply(this, arguments) 15384 15385 xcart.trigger('ga-pageview-sending') 15386 xcart.trigger('ga-pageview-sent') 15387 15388 if ('undefined' != typeof (window.gtag) && this.settings.measurementId) { 15389 gtag('get', this.settings.measurementId, 'session_id', _.bind(this.onSessionIdReceived, this)); 15390 } 15391 }, 15392 15393 sendGTagEvent (action, data) { 15394 if ('undefined' != typeof (window.gtag) && action && !_.isEmpty(data)) { 15395 gtag('event', action, GAMapper.prototype.map(action, data)) 15396 } 15397 }, 15398 15399 onSessionIdReceived (id) { 15400 jQuery.cookie('xcart_ga_session', id); 15401 }, 15402 15403 registerEvent () { 15404 if (!_.isEmpty(arguments)) { 15405 var args = [ 15406 arguments[1] || undefined, 15407 arguments[2] || undefined 15408 ] 15409 this.sendGTagEvent.apply(this, args) 15410 } 15411 }, 15412 15413 isAvailable () { 15414 return !_.isUndefined(window.gaGlobal) 15415 } 15416 }) 15417 15418 GACore.instance = new GACore(); 15419 15420 return GACore; 15421});; 15422/* AUTOGENERATED: ga-mapper.js */ 15423/* vim: set ts=2 sw=2 sts=2 et: */ 15424 15425/** 15426 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 15427 * See https://www.x-cart.com/license-agreement.html for license details. 15428 */ 15429 15430define('googleAnalytics/mapper', ['js/underscore'], function(_) { 15431 return Object.extend({ 15432 15433 map (action, data) { 15434 return data 15435 } 15436 15437 }); 15438});; 15439/* AUTOGENERATED: ga-ec-core.js */ 15440/* vim: set ts=2 sw=2 sts=2 et: */ 15441 15442/** 15443 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 15444 * See https://www.x-cart.com/license-agreement.html for license details. 15445 */ 15446 15447define('googleAnalytics/base/eCommerceCoreEvent', ['googleAnalytics/event', 'js/underscore'], function (GAEvent, _) { 15448 let eCommerceCoreEventBase = GAEvent.extend({ 15449 constructor: function () { 15450 eCommerceCoreEventBase.superclass.constructor.apply(this, arguments) 15451 }, 15452 15453 getActions (type, context) { 15454 if (!jQuery(context).length) { 15455 context = document 15456 } 15457 15458 var actionsOnPage = _.map( 15459 jQuery('*[data-ga-ec-action]', context), 15460 function (actionEl) { 15461 return jQuery(actionEl).data('ga-ec-action') 15462 } 15463 ) 15464 15465 return _.filter(actionsOnPage, function (action) { 15466 return action['ga-type'] === type 15467 }) 15468 } 15469 }) 15470 15471 return eCommerceCoreEventBase; 15472});; 15473/* AUTOGENERATED: ga-ec-impressions.js */ 15474/* vim: set ts=2 sw=2 sts=2 et: */ 15475 15476/** 15477 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 15478 * See https://www.x-cart.com/license-agreement.html for license details. 15479 */ 15480 15481define('googleAnalytics/base/eCommerceImpressionsEvent', ['googleAnalytics/eCommerceCoreEvent', 'js/underscore'], function (eCommerceCoreEvent, _) { 15482 let eCommerceImpressionsEventBase = eCommerceCoreEvent.extend({ 15483 15484 chunkThreshold: 6000, 15485 processedImpressions: {}, 15486 15487 initialize() { 15488 eCommerceImpressionsEventBase.superclass.initialize.apply(this, arguments) 15489 this.resetContainer() 15490 }, 15491 15492 resetContainer () { 15493 this.container = {} 15494 }, 15495 15496 getListeners () { 15497 return { 15498 'ga-pageview-sending': this.registerAllImpressionsInitial, 15499 'list.products.loaded': this.registerAllImpressionsInList, 15500 'ga-ec-addImpression': this.addImpressionExternalHandler 15501 } 15502 }, 15503 15504 registerAllImpressionsInitial (event, data) { 15505 var self = this 15506 15507 self.processImpressionsList(self.getActions('impression')) 15508 }, 15509 15510 registerAllImpressionsInList (event, widget) { 15511 var self = this 15512 15513 self.processedImpressions = {} 15514 15515 self.processImpressionsList(self.getActions('impression', widget['base'])) 15516 }, 15517 15518 addImpressionExternalHandler (event, data) { 15519 this.addImpression(data) 15520 }, 15521 15522 processImpressionsList (actionsData) { 15523 var self = this 15524 var length = 0 15525 15526 _.each( 15527 actionsData, 15528 function (action, index) { 15529 if (self.addImpression(action.data)) { 15530 length += JSON.stringify(action.data).length 15531 } 15532 if (self.calculateChunkThresholdLength(length) > self.chunkThreshold) { 15533 self.flushImpressions() 15534 length = 0 15535 } 15536 } 15537 ) 15538 15539 if (length) { 15540 self.flushImpressions() 15541 } 15542 }, 15543 15544 calculateChunkThresholdLength (length) { 15545 return length 15546 }, 15547 15548 addImpression (impressionData) { 15549 var self = this 15550 var result = false
15551 var hash = self.getImpressionHash(impressionData) 15552 15553 if (hash && !self.processedImpressions[hash]) { 15554 self.addImpressionAction(impressionData) 15555 result = true 15556 15557 self.processedImpressions[hash] = true 15558 } 15559 15560 return result 15561 }, 15562 15563 getImpressionHash (data) { 15564 return null 15565 }, 15566 15567 addImpressionAction (data) { 15568 }, 15569 15570 flushImpressions () { 15571 } 15572 15573 }) 15574 15575 return eCommerceImpressionsEventBase; 15576});; 15577/* AUTOGENERATED: ga-ec-shopping-cart.js */ 15578/* vim: set ts=2 sw=2 sts=2 et: */ 15579 15580/** 15581 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 15582 * See https://www.x-cart.com/license-agreement.html for license details. 15583 */ 15584 15585define('googleAnalytics/base/GAShoppingCartHandleEvent', ['googleAnalytics/eCommerceCoreEvent', 'js/underscore'], function(eCommerceCoreEvent, _) { 15586 let GAShoppingCartHandleEventBase = eCommerceCoreEvent.extend({ 15587 namespace: 'Product', 15588 chunkThreshold: 6000, 15589 15590 constructor: function () { 15591 GAShoppingCartHandleEventBase.superclass.constructor.apply(this, arguments) 15592 this.resetContainer() 15593 }, 15594 15595 resetContainer () { 15596 this.container = {} 15597 }, 15598 15599 getListeners () { 15600 return { 15601 'ga-pageview-sending': this.registerViewCart, 15602 'ga-update-cart': this.registerUpdateCart 15603 } 15604 }, 15605 15606 registerViewCart (event, data) { 15607 var self = this 15608 15609 var actionData = _.first(self.getActions('view_cart')) 15610 if (actionData && !_.isUndefined(actionData.data)) { 15611 self.processViewCart(actionData.data) 15612 } 15613 }, 15614 15615 processViewCart (cartData) { 15616 var self = this 15617 var length = 0 15618 var baseLength = JSON.stringify(this.container).length 15619 15620 _.each( 15621 cartData.items, 15622 function (item, index) { 15623 self.addCartItemAction(item) 15624 length += JSON.stringify(item).length 15625 if ((length + baseLength) > self.chunkThreshold) { 15626 self.flushViewCart() 15627 length = 0 15628 } 15629 } 15630 ) 15631 15632 if (length) { 15633 self.flushViewCart() 15634 } 15635 }, 15636 15637 addCartItemAction (data) { 15638 }, 15639 15640 flushViewCart () { 15641 }, 15642 15643 registerUpdateCart (event, parent_data) { 15644 var data = parent_data.data 15645 if (data.items) { 15646 for (var i = 0; i < data.items.length; i++) { 15647 var item = data.items[i] 15648 15649 if (item.quantity_change > 0) { 15650 this.registerAddItem(item['ga-data'], item.quantity_change) 15651 } else if (item.quantity_change < 0) { 15652 this.registerRemoveItem(item['ga-data'], item.quantity_change) 15653 } 15654 } 15655 } 15656 this.registerItemsChange(data) 15657 }, 15658 15659 registerItemsChange (data) { 15660 }, 15661 registerAddItem (item) { 15662 }, 15663 registerRemoveItem (item) { 15664 } 15665 }) 15666 15667 return GAShoppingCartHandleEventBase; 15668});; 15669/* AUTOGENERATED: ga-ec-change-item.js */ 15670/* vim: set ts=2 sw=2 sts=2 et: */ 15671 15672/** 15673 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 15674 * See https://www.x-cart.com/license-agreement.html for license details. 15675 */ 15676 15677define('googleAnalytics/base/eCommerceChangeItemEvent', ['googleAnalytics/eCommerceCoreEvent', 'js/underscore'], function (eCommerceCoreEvent, _) { 15678 return eCommerceCoreEvent.extend({ 15679 namespace: 'Product', 15680 15681 getListeners () { 15682 return { 15683 productAddedToCart: this.registerAddToCart, 15684 productsAddedToCart: this.registerAddsToCart 15685 } 15686 }, 15687 15688 registerAddToCart (event, data) { 15689 }, 15690 15691 registerAddsToCart (event, data) { 15692 } 15693 15694 }); 15695 } 15696);; 15697/* AUTOGENERATED: ga-ec-product-details-shown.js */ 15698/* vim: set ts=2 sw=2 sts=2 et: */ 15699 15700/** 15701 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 15702 * See https://www.x-cart.com/license-agreement.html for license details. 15703 */ 15704 15705define('googleAnalytics/base/eCommerceDetailsShownEvent', ['googleAnalytics/eCommerceCoreEvent', 'js/underscore'], function (eCommerceCoreEvent, _) { 15706 return eCommerceCoreEvent.extend({ 15707 15708 getListeners () { 15709 return { 15710 'ga-pageview-sending': this.registerAllDetailsShown 15711 } 15712 }, 15713 15714 registerAllDetailsShown (event, data) { 15715 var self = this 15716 15717 _.each( 15718 this.getActions('addProduct'), 15719 function (action, index) { 15720 self.registerDetailsShown(action.data) 15721 } 15722 ) 15723 }, 15724 15725 registerDetailsShown (addProductData) { 15726 } 15727 15728 }); 15729});; 15730/* AUTOGENERATED: ga-ec-product-click.js */ 15731/* vim: set ts=2 sw=2 sts=2 et: */ 15732 15733/** 15734 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 15735 * See https://www.x-cart.com/license-agreement.html for license details. 15736 */ 15737 15738define('googleAnalytics/base/eCommerceProductClickEvent', ['googleAnalytics/eCommerceCoreEvent', 'js/underscore'], function (eCommerceCoreEvent, _) { 15739 let eCommerceProductClickEventBase = eCommerceCoreEvent.extend({ 15740 15741 constructor: function () { 15742 eCommerceProductClickEventBase.superclass.constructor.apply(this, arguments) 15743 15744 var productLinks = jQuery('.products a.product-thumbnail, .products a.fn, .products a.url') 15745 15746 var self = this 15747 15748 productLinks.click(function (event) { 15749 var dataOwner = jQuery('*[data-ga-ec-action]', jQuery(event.currentTarget).parents('.product')) 15750 15751 if (dataOwner.length) { 15752 self.onProductDetailsClick( 15753 dataOwner.data('ga-ec-action').data, 15754 event 15755 ) 15756 } 15757 15758 return true 15759 }) 15760 }, 15761 15762 onProductDetailsClick (data) { 15763 } 15764 15765 }) 15766 15767 return eCommerceProductClickEventBase; 15768});; 15769/* AUTOGENERATED: ga-change-shipping.js */ 15770/* vim: set ts=2 sw=2 sts=2 et: */ 15771 15772/** 15773 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 15774 * See https://www.x-cart.com/license-agreement.html for license details. 15775 */ 15776 15777define('googleAnalytics/base/changeShippingEvent', [ 'googleAnalytics/eCommerceCoreEvent' ], function(Event) { 15778 return Event.extend({ 15779 namespace: 'Checkout', 15780 15781 getListeners () { 15782 return { 15783 updateCart: this.updateCartHandler 15784 } 15785 }, 15786 15787 updateCartHandler (event, data) { 15788 var actionData = _.first(this.getActions('checkout')) 15789 15790 if (actionData && data.shippingMethodName) { 15791 this.sendChangeMethodEvent(data.shippingMethodName, data.shippingTotal || null, actionData) 15792 } 15793 }, 15794 15795 sendChangeMethodEvent (methodName) { 15796 } 15797 }); 15798});; 15799/* AUTOGENERATED: ga-change-payment.js */ 15800/* vim: set ts=2 sw=2 sts=2 et: */ 15801 15802/** 15803 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 15804 * See https://www.x-cart.com/license-agreement.html for license details. 15805 */ 15806 15807define('googleAnalytics/base/changePaymentMethod', [ 'googleAnalytics/eCommerceCoreEvent' ], function(Event) { 15808 return Event.extend({ 15809 namespace: 'Checkout', 15810 15811 getListeners () { 15812 return { 15813 updateCart: this.updateCartHandler 15814 } 15815 }, 15816 15817 updateCartHandler (event, data) { 15818 var actionData = _.first(this.getActions('checkout')) 15819 15820 if (actionData && data.paymentMethodName && xcart.getTarget() === 'checkout') { 15821 this.sendChangeMethodEvent(data.paymentMethodName, actionData) 15822 } 15823 }, 15824 15825 sendChangeMethodEvent (methodName) { 15826 } 15827 }); 15828});; 15829/* AUTOGENERATED: ga-ec-checkout.js */ 15830/* vim: set ts=2 sw=2 sts=2 et: */ 15831 15832/** 15833 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 15834 * See https://www.x-cart.com/license-agreement.html for license details. 15835 */ 15836 15837define('googleAnalytics/base/eCommerceCheckoutStepsEvent', ['googleAnalytics/eCommerceCoreEvent', 'js/underscore'], 15838 function (eCommerceCoreEvent, _) { 15839 15840 return eCommerceCoreEvent.extend({ 15841 ADDRESS_STEP: 'address', 15842 SHIPPING_STEP: 'shipping', 15843 PAYMENT_STEP: 'payment', 15844 PLACE_STEP: 'place', 15845 COMPLETE_STEP: 'complete', 15846 15847 namespace: 'Checkout', 15848 15849 getListeners () { 15850 return { 15851 'ga-checkout-step-entered': this.handleStepEntered, 15852 'ga-checkout-step-completed': this.handleStepCompleted 15853 } 15854 }, 15855 15856 handleStepEntered (event, data) { 15857 var actionData = _.first( 15858 this.getActions('checkout') 15859 ) 15860 15861 if (actionData) { 15862 this._handleStepEntered(data.step, data, actionData) 15863 } 15864 }, 15865 15866 handleStepCompleted (event, data) { 15867 const actionsName = data.step === this.COMPLETE_STEP
15868 ? 'checkout_complete' 15869 : 'checkout' 15870 var actionData = _.first( 15871 this.getActions(actionsName) 15872 ) 15873 15874 if (actionData) { 15875 this._handleStepCompleted(data.step, data, actionData) 15876 } 15877 }, 15878 15879 15880 _handleStepEntered (step, data, actionData) { 15881 }, 15882 _handleStepCompleted (step, data, actionData) { 15883 } 15884 }); 15885 } 15886);; 15887/* AUTOGENERATED: checkout-complete.js */ 15888/* vim: set ts=2 sw=2 sts=2 et: */ 15889 15890/** 15891 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 15892 * See https://www.x-cart.com/license-agreement.html for license details. 15893 */ 15894 15895define('googleAnalytics/checkoutCompleteEvent', ['googleAnalytics/eCommerceCoreEvent'], function(eCommerceCoreEvent) { 15896 let GACheckoutCompleteEvent = eCommerceCoreEvent.extend({ 15897 namespace: 'Checkout', 15898 15899 getListeners () { 15900 return { 15901 'ga-pageview-sending': this.registerInvoiceEnter 15902 } 15903 }, 15904 15905 registerInvoiceEnter () { 15906 xcart.trigger('ga-checkout-step-completed', { 15907 step: 'complete' 15908 }) 15909 } 15910 }) 15911 15912 GACheckoutCompleteEvent.instance = new GACheckoutCompleteEvent(); 15913 15914 return GACheckoutCompleteEvent; 15915});; 15916/* AUTOGENERATED: ga-ec-purchase.js */ 15917/* vim: set ts=2 sw=2 sts=2 et: */ 15918 15919/** 15920 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 15921 * See https://www.x-cart.com/license-agreement.html for license details. 15922 */ 15923 15924define('googleAnalytics/base/eCommercePurchaseEvent', ['googleAnalytics/eCommerceCoreEvent', 'js/underscore'], 15925 function (eCommerceCoreEvent, _) { 15926 return eCommerceCoreEvent.extend({ 15927 15928 getListeners () { 15929 return { 15930 'ga-pageview-sending': this.registerPurchase 15931 } 15932 }, 15933 15934 registerPurchase (event, data) { 15935 //to prevent sending purchase action before step 5 checkout action 15936 setTimeout(this._registerPurchase.bind(this), 300) 15937 }, 15938 15939 _registerPurchase (event, data) { 15940 var actionData = _.first(this.getActions('purchase')) 15941 15942 if (actionData) { 15943 this._registerPurchaseEvent( 15944 actionData['data']['products'], 15945 actionData['data']['actionData'] 15946 ) 15947 } 15948 }, 15949 15950 _registerPurchaseEvent (productsData, actionData) { 15951 } 15952 15953 }); 15954 } 15955);; 15956/* AUTOGENERATED: ga-vehicle.js */ 15957/* vim: set ts=2 sw=2 sts=2 et: */ 15958 15959/** 15960 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 15961 * See https://www.x-cart.com/license-agreement.html for license details. 15962 */ 15963 15964define('googleAnalytics/base/vehicle_event', ['googleAnalytics/eCommerceCoreEvent'], function (eCommerceCoreEvent) { 15965 15966 return eCommerceCoreEvent.extend({ 15967 namespace: 'vehicleEvent', 15968 15969 findGaLevelSelectorData () { 15970 return $('.last_make_vehicle_data') 15971 }, 15972 15973 processReady () { 15974 this.processGaEvents() 15975 this.processSuccessfullySelectedVin() 15976 }, 15977 15978 processGaEvents () { 15979 const levelSelectors = this.findGaLevelSelectorData() 15980 15981 if (!levelSelectors.length) { 15982 return 15983 } 15984 15985 const _this = this 15986 15987 levelSelectors.each(function () { 15988 const gaEvent = $(this).attr('data-ga-ec-action') 15989 const parsedEvent = JSON.parse(gaEvent) 15990 _this.sendVehicleEvent(parsedEvent) 15991 }) 15992 }, 15993 15994 processSuccessfullySelectedVin() { 15995 const _this = this 15996 xcart.bind('vinSuccessfullySelectedGA', function (event, data) { 15997 const formattedEvent = _this.formatVinDataForSendEvent(data.data) 15998 const configuredEvents = _this.setEventsForVinSelect(formattedEvent, data.data.isAddToGarage) 15999 configuredEvents.forEach((item) => { 16000 _this.sendVehicleEvent(item) 16001 }) 16002 }); 16003 }, 16004 16005 formatVinDataForSendEvent(data) { 16006 const levels = [1, 2, 3, 4] 16007 let eventData = { 16008 data: { 16009 vehicle: '', 16010 } 16011 } 16012 16013 levels.forEach(function (item, index) { 16014 if (data.selected[item]) { 16015 if (index > 0) { 16016 16017 eventData.data.vehicle += '/'; 16018 } 16019 eventData.data.vehicle += data.selected[item].value; 16020 } 16021 }); 16022
16023 const keys = Object.keys(data.selected) 16024 16025 const lastKey = keys[keys.length - 1] 16026 16027 eventData.data['level' + lastKey + '_id'] = data.selected[lastKey].id; 16028 16029 return eventData 16030 }, 16031 16032 setEventsForVinSelect(event, isAddToGarage) { 16033 let events = [{...event, 'ga-type': 'select_vehicle'}] 16034 16035 if (isAddToGarage) { 16036 events.push({...event, 'ga-type': 'add_vehicle'}) 16037 } 16038 16039 return events 16040 }, 16041 16042 sendVehicleEvent (eventData) { 16043 16044 } 16045 16046 }) 16047});; 16048/* AUTOGENERATED: ga-ec-wishlist.js */ 16049/* vim: set ts=2 sw=2 sts=2 et: */ 16050 16051/** 16052 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 16053 * See https://www.x-cart.com/license-agreement.html for license details. 16054 */ 16055 16056define('googleAnalytics/base/eCommerceWishlistHandleEvent', ['googleAnalytics/eCommerceCoreEvent', 'js/underscore'], function (eCommerceCoreEvent, _) { 16057 return eCommerceCoreEvent.extend({ 16058 namespace: 'Product', 16059 16060 getListeners () { 16061 return { 16062 gaProductAddedToWishlist: this.registerAddToWishlist 16063 } 16064 }, 16065 16066 registerAddToWishlist (event, data) { 16067 } 16068 16069 }); 16070 } 16071);; 16072/* AUTOGENERATED: ga-ec-core.js */ 16073/* vim: set ts=2 sw=2 sts=2 et: */ 16074 16075/** 16076 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 16077 * See https://www.x-cart.com/license-agreement.html for license details. 16078 */ 16079 16080define('googleAnalytics/eCommerceCoreEvent', ['googleAnalytics/base/eCommerceCoreEvent', 'googleAnalytics/event', 'js/underscore'], function (eCommerceCoreEventBase, GAEvent, _) { 16081 let eCommerceCoreEvent = eCommerceCoreEventBase.extend({ 16082 container: {} 16083 }) 16084 16085 eCommerceCoreEvent.instance = new eCommerceCoreEvent(); 16086 16087 return eCommerceCoreEvent; 16088});; 16089/* AUTOGENERATED: ga-ec-impressions.js */ 16090/* vim: set ts=2 sw=2 sts=2 et: */ 16091 16092/** 16093 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 16094 * See https://www.x-cart.com/license-agreement.html for license details. 16095 */ 16096 16097define('googleAnalytics/eCommerceImpressionsEvent', ['googleAnalytics/base/eCommerceImpressionsEvent', 'googleAnalytics/eCommerceCoreEvent', 'js/underscore'], function (eCommerceImpressionsEventBase, eCommerceCoreEvent, _) { 16098 let eCommerceImpressionEvent = eCommerceImpressionsEventBase.extend({ 16099 16100 initialize () { 16101 eCommerceImpressionEvent.superclass.initialize.apply(this, arguments) 16102 var currency = this.coreInstance.getSetting('currency') 16103 this.list_container_tpl = { 16104 currency, 16105 item_list_name: '', 16106 items: [] 16107 } 16108 }, 16109 16110 resetContainer () { 16111 this.container.lists = {} 16112 }, 16113 16114 getImpressionHash (data) { 16115 return window.xcart.utils.hash( 16116 _.omit(data, 'index') 16117 ) 16118 }, 16119 16120 getListHash (list) { 16121 return window.xcart.utils.hash({name: list}) 16122 }, 16123 16124 calculateChunkThresholdLength (length) { 16125 return JSON.stringify(this.container).length 16126 }, 16127 16128 addImpressionAction (data) { 16129 var listHash = this.getListHash(data.item_list_name) 16130 16131 if (_.isUndefined(this.container.lists[listHash])) { 16132 this.container.lists[listHash] = JSON.parse(JSON.stringify(this.list_container_tpl)) 16133 } 16134 this.container.lists[listHash].item_list_name = data.item_list_name 16135 this.container.lists[listHash].items.push(data) 16136 }, 16137 16138 flushImpressions () { 16139 for (var listHash in this.container.lists) { 16140 if (this.container.lists.hasOwnProperty(listHash)) { 16141 this.sendEvent('view_item_list', this.container.lists[listHash]) 16142 } 16143 } 16144 this.resetContainer() 16145 } 16146 16147 }) 16148 16149 eCommerceImpressionEvent.instance = new eCommerceImpressionEvent(); 16150 16151 return eCommerceImpressionEvent; 16152});; 16153/* AUTOGENERATED: ga-ec-shopping-cart.js */ 16154/* vim: set ts=2 sw=2 sts=2 et: */ 16155 16156/** 16157 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 16158 * See https://www.x-cart.com/license-agreement.html for license details. 16159 */ 16160 16161define('googleAnalytics/GAShoppingCartHandleEvent', ['googleAnalytics/base/GAShoppingCartHandleEvent', 'js/underscore'], function(GAShoppingCartHandleEventBase, _) { 16162 let GAShoppingCartHandleEvent = GAShoppingCartHandleEventBase.extend({ 16163 changes: { 16164 add: [], 16165 remove: [] 16166 }, 16167 16168 resetContainer () { 16169 var actionData = _.first(this.getActions('view_cart')) 16170 var currency = this.coreInstance.getSetting('currency') 16171 var value = 0 16172 16173 if (actionData && !_.isUndefined(actionData.context)) { 16174 if (actionData.context.currency) { 16175 currency = actionData.context.currency 16176 } 16177 if (actionData.context.value) { 16178 value = actionData.context.value 16179 } 16180 } 16181 16182 this.container = { 16183 currency, 16184 items: [] 16185 } 16186 16187 if (value) { 16188 this.container.value = value 16189 } 16190 }, 16191 16192 addCartItemAction (data) { 16193 this.container.items.push(data) 16194 }, 16195 16196 flushViewCart () { 16197 this.sendEvent('view_cart', this.container) 16198 this.resetContainer() 16199 }, 16200 16201 registerAddItem (item, quantity_change) { 16202 item.quantity = Math.abs(quantity_change) 16203 this.changes.add.push(item) 16204 }, 16205 16206 registerRemoveItem (item, quantity_change) { 16207 item.quantity = Math.abs(quantity_change) 16208 this.changes.remove.push(item) 16209 }, 16210 16211 registerItemsChange (data) { 16212 var currency = this.coreInstance.getSetting('currency') 16213 16214 if (this.changes.add.length) { 16215 this.sendEvent('add_to_cart', { 16216 currency, 16217 value: this.calculateChangesValue(this.changes.add), 16218 items: this.changes.add 16219 }) 16220 this.changes.add = [] 16221 } 16222 16223 if (this.changes.remove.length) { 16224 this.sendEvent('remove_from_cart', { 16225 currency, 16226 value: this.calculateChangesValue(this.changes.remove), 16227 items: this.changes.remove 16228 }) 16229 this.changes.remove = [] 16230 } 16231 }, 16232 16233 calculateChangesValue (items) { 16234 var value = 0 16235 16236 _.each( 16237 items, 16238 function (item, index) { 16239 value += parseFloat(item.price) * item.quantity 16240 } 16241 ) 16242 16243 return value 16244 } 16245 16246 }) 16247 16248 GAShoppingCartHandleEvent.instance = new GAShoppingCartHandleEvent(); 16249 16250 return GAShoppingCartHandleEvent; 16251});;
16252/* AUTOGENERATED: ga-ec-change-item.js */ 16253/* vim: set ts=2 sw=2 sts=2 et: */ 16254 16255/** 16256 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 16257 * See https://www.x-cart.com/license-agreement.html for license details. 16258 */ 16259 16260define('googleAnalytics/eCommerceChangeItemEvent', ['googleAnalytics/base/eCommerceChangeItemEvent', 'js/underscore'], function (eCommerceChangeItemEventBase, _) { 16261 let eCommerceChangeItemEvent = eCommerceChangeItemEventBase.extend({ 16262 16263 registerAddToCart (event, data) { 16264 var currency = this.coreInstance.getSetting('currency') 16265 var gaProductData = data.gaProductData 16266 16267 if (gaProductData) { 16268 if (!_.isUndefined(gaProductData.list)) { 16269 gaProductData.item_list_name = gaProductData.list 16270 } 16271 this.sendEvent('add_to_cart', { 16272 currency, 16273 items: [gaProductData] 16274 }) 16275 } 16276 }, 16277 16278 registerAddsToCart (event, products) { 16279 let gaProducts = []; 16280 products.forEach((product) => { 16281 let gaProductData = product.gaProductData; 16282 if (gaProductData) { 16283 if (!_.isUndefined(gaProductData.list)) { 16284 gaProductData.item_list_name = gaProductData.list; 16285 } 16286 gaProducts.push(gaProductData); 16287 } 16288 }, products); 16289 16290 if (!_.isEmpty(gaProducts)) { 16291 const currency = this.coreInstance.getSetting('currency'); 16292 this.sendEvent('add_to_cart', { 16293 currency, 16294 items: gaProducts 16295 }); 16296 } 16297 } 16298 16299 }); 16300 16301 eCommerceChangeItemEvent.instance = new eCommerceChangeItemEvent(); 16302 16303 return eCommerceChangeItemEvent; 16304 } 16305);; 16306/* AUTOGENERATED: ga-ec-product-details-shown.js */ 16307/* vim: set ts=2 sw=2 sts=2 et: */ 16308 16309/** 16310 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 16311 * See https://www.x-cart.com/license-agreement.html for license details. 16312 */ 16313 16314define('googleAnalytics/eCommerceDetailsShownEvent', ['googleAnalytics/base/eCommerceDetailsShownEvent', 'js/underscore'], function (eCommerceDetailsShownEventBase, _) { 16315 let eCommerceDetailsShownEvent = eCommerceDetailsShownEventBase.extend({ 16316 16317 registerDetailsShown (addProductData) { 16318 var currency = this.coreInstance.getSetting('currency') 16319 this.sendEvent('view_item', { 16320 currency, 16321 items: [addProductData] 16322 }) 16323 } 16324 16325 }) 16326 16327 eCommerceDetailsShownEvent.instance = new eCommerceDetailsShownEvent(); 16328 16329 return eCommerceDetailsShownEvent; 16330});; 16331/* AUTOGENERATED: ga-ec-product-click.js */ 16332/* vim: set ts=2 sw=2 sts=2 et: */ 16333 16334/** 16335 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 16336 * See https://www.x-cart.com/license-agreement.html for license details. 16337 */ 16338 16339define('googleAnalytics/eCommerceProductClickEvent', ['googleAnalytics/base/eCommerceProductClickEvent', 'js/underscore', 'googleAnalytics/core'], function (eCommerceProductClickEventBase, _, gaCore) { 16340 16341 let eCommerceProductClickEvent = eCommerceProductClickEventBase.extend({ 16342 is_sent: false, 16343 16344 onProductDetailsClick (data, event) { 16345 var self = this 16346 16347 if (self.is_sent || !gaCore.instance.isAvailable()) { 16348 return 16349 } 16350 16351 event.preventDefault() 16352 16353 this.sendEvent('select_item', { 16354 item_list_name: data.item_list_name, 16355 items: [data], 16356 event_callback () { 16357 self.createFunctionWithTimeout(function (e) { 16358 self.is_sent = true 16359 e.currentTarget.click() 16360 }, event) 16361 } 16362 }) 16363 } 16364 16365 }) 16366 16367 eCommerceProductClickEvent.instance = new eCommerceProductClickEvent(); 16368 16369 return eCommerceProductClickEvent; 16370});; 16371/* AUTOGENERATED: ga-change-shipping.js */ 16372/* vim: set ts=2 sw=2 sts=2 et: */ 16373 16374/** 16375 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 16376 * See https://www.x-cart.com/license-agreement.html for license details. 16377 */ 16378 16379define('googleAnalytics/changeShippingEvent', [ 'googleAnalytics/base/changeShippingEvent', 'googleAnalytics/event' ], function(GAChangeShippingEventBase, Event) { 16380 let GAChangeShippingEvent = GAChangeShippingEventBase.extend({ 16381 sendChangeMethodEvent (methodName, value, actionData) { 16382 const currency = this.coreInstance.getSetting('currency') 16383 16384 this.sendEvent('add_shipping_info', { 16385 value, 16386 currency, 16387 shipping_tier: methodName, 16388 items: actionData.data.products 16389 }) 16390 } 16391 }) 16392 16393 GAChangeShippingEvent.instance = new GAChangeShippingEvent(); 16394 16395 return GAChangeShippingEvent; 16396});;
16397/* AUTOGENERATED: ga-change-payment.js */ 16398/* vim: set ts=2 sw=2 sts=2 et: */ 16399 16400/** 16401 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 16402 * See https://www.x-cart.com/license-agreement.html for license details. 16403 */ 16404 16405define('googleAnalytics/changePaymentMethod', [ 'googleAnalytics/base/changePaymentMethod', 'googleAnalytics/event' ], function(GAChangePaymentEventBase, Event) { 16406 let GAChangePaymentEvent = GAChangePaymentEventBase.extend({ 16407 sendChangeMethodEvent (methodName, actionData) { 16408 this.sendEvent('add_payment_info', { 16409 payment_type: methodName, 16410 items: actionData.data.products 16411 }) 16412 } 16413 }) 16414 16415 GAChangePaymentEvent.instance = new GAChangePaymentEvent(); 16416 16417 return GAChangePaymentEvent; 16418});; 16419/* AUTOGENERATED: ga-ec-checkout.js */ 16420/* vim: set ts=2 sw=2 sts=2 et: */ 16421 16422/** 16423 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 16424 * See https://www.x-cart.com/license-agreement.html for license details. 16425 */ 16426 16427define('googleAnalytics/eCommerceCheckoutStepsEvent', [ 'googleAnalytics/base/eCommerceCheckoutStepsEvent', 'googleAnalytics/event' ], function(eCommerceCheckoutStepBaseEvent, Event) { 16428 let eCommerceCheckoutStepEvent = eCommerceCheckoutStepBaseEvent.extend({ 16429 _handleStepEntered (step, data, actionData) { 16430 const currency = this.coreInstance.getSetting('currency') 16431 16432 switch (step) { 16433 case this.ADDRESS_STEP: 16434 this.sendEvent('begin_checkout', { 16435 currency, 16436 items: actionData.data.products 16437 }) 16438 16439 break 16440 16441 case this.SHIPPING_STEP: 16442 // TODO Methods reloading should be handled 16443 this.sendEvent('add_shipping_info', { 16444 value: actionData.data.shipping_value, 16445 currency, 16446 shipping_tier: actionData.data.shipping_method, 16447 items: actionData.data.products 16448 }) 16449 break 16450 16451 case this.PAYMENT_STEP: 16452 this.sendEvent('add_payment_info', { 16453 payment_type: actionData.data.payment_method, 16454 items: actionData.data.products 16455 }) 16456 break 16457 16458 case this.PLACE_STEP: 16459 break 16460 16461 case this.COMPLETE_STEP: 16462 break 16463 } 16464 }, 16465 16466 _handleStepCompleted (step, data, actionData) { 16467 switch (step) { 16468 case this.ADDRESS_STEP: 16469 break 16470 16471 case this.SHIPPING_STEP: 16472 break 16473 16474 case this.PAYMENT_STEP: 16475 break 16476 16477 case this.PLACE_STEP: 16478 break 16479 16480 case this.COMPLETE_STEP: 16481 break 16482 } 16483 } 16484 }) 16485 16486 eCommerceCheckoutStepEvent.instance = new eCommerceCheckoutStepEvent(); 16487 16488 return eCommerceCheckoutStepEvent; 16489});; 16490/* AUTOGENERATED: ga-ec-purchase.js */ 16491/* vim: set ts=2 sw=2 sts=2 et: */ 16492 16493/** 16494 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 16495 * See https://www.x-cart.com/license-agreement.html for license details. 16496 */ 16497 16498define('googleAnalytics/purchaseEvent', ['googleAnalytics/base/eCommercePurchaseEvent', 'js/underscore'], 16499 function (eCommercePurchaseBaseEvent, _) { 16500 let eCommercePurchaseEvent = eCommercePurchaseBaseEvent.extend({ 16501 _registerPurchaseEvent (productsData, actionData) { 16502 if (_.isUndefined(actionData.items)) { 16503 actionData.items = productsData 16504 } 16505 this.sendEvent('purchase', actionData) 16506 } 16507 16508 }) 16509 16510 eCommercePurchaseEvent.instance = new eCommercePurchaseEvent(); 16511 16512 return eCommercePurchaseEvent; 16513 } 16514);; 16515/* AUTOGENERATED: ga-vehicle.js */ 16516/* vim: set ts=2 sw=2 sts=2 et: */ 16517 16518/** 16519 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 16520 * See https://www.x-cart.com/license-agreement.html for license details. 16521 */ 16522 16523define('googleAnalytics/vehicle_event', ['googleAnalytics/base/vehicle_event'], function (vehicleEvent) { 16524 const handleVehicleEvent = vehicleEvent.extend({ 16525 sendVehicleEvent (eventData) { 16526 this.sendEvent(eventData['ga-type'], eventData.data) 16527 } 16528 }) 16529 16530 handleVehicleEvent.instance = new handleVehicleEvent() 16531 16532 return handleVehicleEvent 16533});; 16534/* AUTOGENERATED: ga-ec-wishlist.js */ 16535/* vim: set ts=2 sw=2 sts=2 et: */ 16536 16537/** 16538 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved. 16539 * See https://www.x-cart.com/license-agreement.html for license details. 16540 */ 16541 16542define('googleAnalytics/eCommerceWishlistHandleEvent', ['googleAnalytics/base/eCommerceWishlistHandleEvent', 'js/underscore'], function (eCommerceWishlistHandleEventBase, _) { 16543 let eCommerceWishlistHandleEvent = eCommerceWishlistHandleEventBase.extend({ 16544 16545 registerAddToWishlist (event, data) { 16546 var gaProductData = data.gaProductData 16547 16548 if (gaProductData) { 16549 if (!_.isUndefined(gaProductData.list)) { 16550 gaProductData.item_list_name = gaProductData.list 16551 } 16552 16553 this.sendEvent('add_to_wishlist', { 16554 items: [gaProductData] 16555 }) 16556 } 16557 } 16558 16559 }) 16560 16561 eCommerceWishlistHandleEvent.instance = new eCommerceWishlistHandleEvent(); 16562 16563 return eCommerceWishlistHandleEvent; 16564 } 16565);;
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.